lib/scribd_fu/paperclip.rb in scribd_fu-2.0.7 vs lib/scribd_fu/paperclip.rb in scribd_fu-2.0.8

- old
+ new

@@ -26,12 +26,16 @@ # 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 - path = (attached_file.url =~ ScribdFu::S3) ? attached_file.url : attached_file.path - pos = path.rindex('?') - (pos) ? path[0, pos] : path + if ScribdFu::amazon_based?(attached_file.url) + path = attached_file.url + else + path = attached_file.path + end + + ScribdFu::strip_cache_string(path) end private