On Thu, Apr 24, 2014 at 3:18 PM, Anand Soni <sonianan...@gmail.com> wrote: > Hi I am trying to write file in heroku as per the file system allowed in > heroku. I want to do my audio file upload to S3 async manner, so I am using > delayed_job for that. what I am doing is I am first writing content into > file and then create a job which will upload to S3 then delete file created > locally. > > For this I am writing file in "#{Rails.root}/tmp". When I check log it shows > created but when my job worker try to access it, it never found at same > location. I am not understating why its happening even I didn't get any > error creating file in tmp folder in my rails app and still my job worker > can't find the file in tmp folder > > Please help me to solve this. Thanks.
The file system is not shared across different dynos: by putting stuff in delayed_job it's going to be executed by another worker that does not have access to that temporary file. If the file is a "simple" upload from the user, you might want to consider pre-signed S3 urls. Otherwise your only other async-ish option is to fork a worker within the web dyno that has access to the temporary file while also returning a request immediately. -- -- You received this message because you are subscribed to the Google Groups "Heroku" group. To unsubscribe from this group, send email to heroku+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/heroku?hl=en_US?hl=en --- You received this message because you are subscribed to the Google Groups "Heroku Community" group. To unsubscribe from this group and stop receiving emails from it, send an email to heroku+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.