From: Sina Iman Date: 2008-01-17T07:43:07+09:00 Subject: File upload works fine in FF, Crashes server in IE I made a file upload system. It works perfectly in Firefox, with both large and small files (Tempfiles and StringIO) being copied into the appropriate server directory. The uploading works the same in IE too, for small files that have the type of StringIO. For some reason, when I upload a large file through IE (meaning a file large enough to be handled as a Tempfile by Ruby) the parameter sent over is a humongous plaintext string that I can only assume is the plaintext representation of the binary file data. This string is very large and crashes my server. Please help. View (imagine it like this, there's actually alot of javascript for the multiple upload thing, and also file input decoration):
Controller (this is a handler for multiple files): params['content']['uploaded_data'].each { |v| if v[1].to_s == "" next end valid = true # SET TO NULL_PROJECT of id 0, since we will set project id later content = Content.new(:project_id => 0) content.upload_salt = salt content.save! post = DataFile.save(v[1], content.content_id.to_i.to_s) content.content_url = post content.content_type = DataFile.get_type(content.content_url) content.original_filename = DataFile.sanitize_filename(v[1].original_filename) content.content_add_date = Time.now content.save! } The screenshot is of the console output when I attempted to upload a 4.5MB file through Internet Explorer Attachments: http://www.ruby-forum.com/attachment/1314/dammit.png -- Posted via http://www.ruby-forum.com/.