How to check that my params[‘Filedata’] is corrupted or not?
I have function it’s reading file from params['Filedata'] and writing it to the other file.
File.open(upload_file, "wb") { |f| f.write(params['Filedata'].read) }
this line working fine for me..
But when i am calling this function with delayed job function send_later than I am getting error with params['Filedata'].read.
I’m guessing
params['Filedata']refers to a uploaded file.Rails handles uploaded data as temporary files, which are deleted after the request is completed. If you want to access the file later, you need to copy it to a more permanent location.