You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Initialize S3 client outside out of iterator. Re-initializing was causing intermittent failures. arbitrary_url_for's default style_name should be :original, as :default is Paperclip's default 300x300 thumbnail. Parameterize update_url, rather than using ENV variables. Store s3.get_object stream in memory rather than targeting filesystem.
Copy file name to clipboardExpand all lines: lib/tasks/cortex.rake
+9-18
Original file line number
Diff line number
Diff line change
@@ -209,35 +209,26 @@ namespace :cortex do
209
209
end
210
210
211
211
namespace:mediado
212
-
desc'Manage Cortex media'
213
-
task:update_url=>:environmentdo
214
-
old_url=ENV['OLD_PATH']
215
-
unlessold_url
216
-
puts'OLD_PATH must be set'
212
+
desc'Update existing Media assets on S3 with new URL structure. Specify new structure in model, then pass old_path with the previous structure, i.e.: ":class/:attachment/:style-:id.:extension"'
0 commit comments