Show 2 more comments. Create model and save it to DB Syed Aslam Syed Aslam 8, 5 5 gold badges 41 41 silver badges 53 53 bronze badges.
And it reads the data upon upload? Do you need to create a separate view and a form to upload the file? I use paperclip to upload and have different views for creating the upload and I process the file and read data upon upload.
I see thanks -- almost ready to run it live to see if it goes It's built on to of roo gem. It allows you to parse xls, xlsx and csv files. Has a DSL to handle: Column mapping. Leantraxxx Leantraxxx 4, 3 3 gold badges 35 35 silver badges 53 53 bronze badges. Sign up or log in Sign up using Google. Sign up using Facebook. Sign up using Email and Password. Post as a guest Name. Email Required, but never shown.
The Overflow Blog. The jQuery File Upload Plugin This plugin is extremely full-featured and comprehensively documented, which was exactly the problem I had with it. Some important points: I decided to use a simple JavaScript hashing function to hash the filename for the Session-Id.
It might not need to be numeric, but all the nginx examples I read used numeric filenames, and the Session-Id is used directly by nginx as the filename on disk. As noted in the comment, the response to an individual upload request is a plain-text byte range, which is also present in the Content-Range header.
The plugin uses this value to determine the next chunk of the file to upload. This means that in order to resume an upload, the first chunk of the file must be re-uploaded. Then nginx responds with the last successful byte range, and the plugin will start from there on the next request. This can be momentarily disconcerting, since it looks like the upload has started over.
Set your chunk size accordingly. That is the temp file. Rails provides two extra methods to determine the original filename and the MIME-type:. How are we doing? Please help us improve Stack Overflow. Take our short survey. Stack Overflow for Teams — Collaborate and share knowledge with a private group. Create a free Team What is Teams? Collectives on Stack Overflow. Learn more. Where can I save uploaded files in Rails? Ask Question. Asked 8 years, 8 months ago.
Active 5 years ago. Active 1 month ago. Viewed 22k times. Server-side config will be required to accept large POST requests and probably a 64bit machine to handle anything over 4Gb. AWS supports multipart upload. A library for Bitorrent although this requires a transmission client which is not ideal Can all of these methods be resumed like FTP, the reason I dont want to use FTP is that I want to keep in the web app if this is possible?
Improve this question. Community Bot 1 1 1 silver badge. Add a comment. Active Oldest Votes. Improve this answer. Brad Werth Brad Werth Bmxer Bmxer 1 1 gold badge 3 3 silver badges 9 9 bronze badges. Please go through it. Catmandu Catmandu 2, 6 6 gold badges 27 27 silver badges 48 48 bronze badges. There is a bit of performance issue when using amazon. I think that Brad Werth nailed the answer just one approach could be upload directly to S3 and even if you do need some reprocessing after you could theoretical use aws lambda to notify your app Let me also pin down few options that might help others looking for a real world solution.
Milind Milind 4, 2 2 gold badges 22 22 silver badges 53 53 bronze badges. Hi Milind, does your implementation also report file progress for multiple uploads? If so, how did you handle this? Details added markmoxx — Milind. Great, thanks Milind — markmoxx.
Sign up or log in Sign up using Google.
0コメント