mirror of
https://github.com/diaspora/diaspora.git
synced 2026-04-29 03:01:03 -04:00
Logging for the differing id problem in remote photos
This commit is contained in:
@@ -21,14 +21,18 @@ class Photo < Post
|
||||
photo.image.store! image_file
|
||||
photo
|
||||
end
|
||||
|
||||
after_save {Rails.logger.info("After saving now the id is #{id}"
|
||||
|
||||
def remote_photo
|
||||
@remote_photo ||= User.owner.url.chop + image.url
|
||||
end
|
||||
|
||||
def remote_photo= remote_path
|
||||
Rails.logger.info("Setting remote photo with id #{id}")
|
||||
@remote_photo = remote_path
|
||||
image.download! remote_path
|
||||
image.store!
|
||||
Rails.logger.info("Setting remote photo with id #{id}")
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user