|FileUpload without Tempfile||Helmut Juskewycz||4/8/11 4:38 AM|
I am looking for a way to upload a file to Rails 3 app, but without
generating a temp file. Googling the issue gave me some insight in how
the file upload works. As I understand Rails creates a temp file when
the file size is larger than 20kb. Is there a way to change this limit
and avoid the temp file generation?
Another solution I was looking in was creating a Rack App and so avoid
the file generation, however, didn't work either. Same with a Sinatra
Btw. yes it is mandatory that the file is not saved and only kept in
memory for security reasons.
|Re: [Rails] FileUpload without Tempfile||Chris Mear||4/8/11 5:00 AM|
On 8 April 2011 12:38, Helmut Juskewycz <hjusk...@gmail.com> wrote:
What you've discovered is that it's not really Rails or Sinatra that's
I think you'll need to dig down to that web server - app interface
|Re: FileUpload without Tempfile||Helmut Juskewycz||4/8/11 5:13 AM|
Thanks for pointing out that it is in Rack. Brings me one step closer
to a solution.
On Apr 8, 2:00 pm, Chris Mear <chrism...@gmail.com> wrote:
I am not sure what you mean with 'to that web server'
|Re: FileUpload without Tempfile||Frederick Cheung||4/8/11 5:22 AM|
Is it enough for /tmp to be something like tmpfs (ie non persistent) ?
|Re: [Rails] Re: FileUpload without Tempfile||Chris Mear||4/8/11 5:25 AM|
Sorry, badly worded. I meant that it's happening at the interface between the web server and your app; in this case that's where Rack lives.
|Re: FileUpload without Tempfile||Helmut Juskewycz||4/8/11 8:25 AM|
|Re: FileUpload without Tempfile||Helmut Juskewycz||4/8/11 8:48 AM|
|Re: FileUpload without Tempfile||Mike||5/9/11 1:40 AM|
>You could unlink the Tempfile right after creation, as mentioned here:
That will prevent any other process to get hands on that file.