× {{alert.msg}} Never ask again
Get notified about new tutorials RECEIVE NEW TUTORIALS

Processing uploaded files using background tasks

Dalibor Ilijevski
Dec 15, 2014
<p>If you are processing uploaded files in background process (using sidekiq, resque or delayed_job), be sure to upload files in directory that is under your control. </p><p>We had a problem that sidekiq worker was not able to process files. <span style="font-family:lato,sans-serif">Everything worked well on the localhost. When the projects was deployed to Heroku it stopped working.</span></p><p>It turned out that files were uploaded to /tmp directory (once ther were processed, they were not needed any more). Since Heroku deletes files from the /tmp directory, sidekiq worker was not able to find uploaded files from the queue. </p><p>After we changed to upload files in directory under Rails root, everything started working well again. </p>
comments powered by Disqus