[Rails] Re: need to parse a User uploaded file, but don't care if it's saved

2010-03-25 Thread GoodGets
So instead of saving the file somewhere, it'll just grab it from the tmp directory, parse it, then leave it up to Rails or the server to expire the file after that request is over. Great, that's exactly what I want. I plan on knocking this out tomorrow, and although I may have a question or two o

[Rails] Re: need to parse a User uploaded file, but don't care if it's saved

2010-03-24 Thread Jeff Lewis
re: where is it read from?: I use passenger to serve my rails apps these days (all running on *nix), and per the passenger docs: http://www.modrails.com/documentation/Users%20guide.html#_passengertempdir_lt_directory_gt ... 5.10. PassengerTempDir Specifies the directory that Phusion Passenger s

[Rails] Re: need to parse a User uploaded file, but don't care if it's saved

2010-03-23 Thread GoodGets
@Luke: Thanks! Yeah, I saw that tutorial, too. But, also like you said, it still saves it to a model, so I'd rather just let paperclip handle all that. Thank you anyway though. @Jeff: Thank you! For full disclosure, I'm still a little bit of a noob to Rails (and ruby) but I think I get more t

[Rails] Re: need to parse a User uploaded file, but don't care if it's saved

2010-03-23 Thread Jeff Lewis
One way would be to just process the uploaded-file data from the request as needed and not worry about saving or doing anything else with the tmp-saved uploaded-file itself, something like: ### in ./app/models/uploadable_file.rb class UploadableFile ### for use in testing: def initialize(fna

[Rails] Re: need to parse a User uploaded file, but don't care if it's saved

2010-03-23 Thread Luke Pearce
Sorry just to add that tutorial saves it in a model - but obviously you don't need to do that. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-t.

[Rails] Re: need to parse a User uploaded file, but don't care if it's saved

2010-03-23 Thread Luke Pearce
Don't know if this is any use - but you could just upload it yourself (rather than using paperclip or file_column): http://www.tutorialspoint.com/ruby-on-rails/rails-file-uploading.htm You can choose the directory that you want it saved in, then delete the file as soon as you are done with it.