lib/scribd_fu/paperclip.rb in scribd_fu-2.0.10 vs lib/scribd_fu/paperclip.rb in scribd_fu-2.0.11

- old
+ new

@@ -27,11 +27,15 @@ # Returns the full filename for the given attribute. If the file is # stored on S3, this is a full S3 URI, while it is a full path to the # local file if the file is stored locally. def file_path if ScribdFu::amazon_based?(attached_file.url) - path = attached_file.url + if attached_file.instance_variable_get(:@s3_permissions) == "authenticated-read" + return attached_file.expiring_url(60) + else + path = attached_file.url + end else path = attached_file.path end ScribdFu::strip_cache_string(path) @@ -53,5 +57,6 @@ end end end +