file-upload

Why did I get "FileUploadException: Stream ended unexpectedly" with Apache Commons FileUpload?

What is the reason for encountering this Exception: org.apache.commons.fileupload.FileUploadException: Processing of multipart/form-data request failed. Stream ended unexpectedly ...

How to have jQuery restrict file types on upload?

I would like to have jQuery limit a file upload feild to only jpg/jpeg, png, and gif. I am doing backend checking with php already. I am running my submit button through a javascript function already so I really just need to know how to check for the filetypes before submit or alert. Thanks! ...

Large file uploads with Java applet

Hi, I've been tasked with implementing large (2gb+) file uploads via a web browser. After evaluating various technologies, java applets seem to be the way forward (only one's which provide proper access to the local disk). I was wondering if anyone can recommend a 3rd party file upload app we can use as a base? requirements are Decen...

File Upload using zend framework 1.7.4

I am trying to upload file using zend frame work but have not been successful. I have read Akras tutorial, which was helpful but when i used those techniques in my project I was not able to get it to work. ...

How to extract the entire path when a user uploads a file using jquery

Hi All, I am trying to extract the entire path of the file that a user uploads on the browser and this i need to do using javascript or jquery. If i give ($("#userfile").val()); i am able to extract only the file name and not the entire path. Could someone please help me with this? ...

Uploading files past Asp.net request length limit?

I searched SO and found this question, but it's not quite what I'm asking. I'm wondering if a IHttpModule can be created that can inspect the ContentLength of the request, and if so either redirect or somehow throw that request out and create a new one. Specifically, I'm trying to handle image file uploads, but I'd like to have the ...

Uploading files to server

I am trying to upload a file from my Windows application to the server into a particular Folder using C#. However, I am getting an exception: "An exception occurred during a WebClient request". Here is my code: for (int i = 0; i < dtResponseAttach.Rows.Count; i++) { string filePath = dtResponseAttach.Rows[i]["Response"]; WebC...

Having an image stripped of metadata upon upload in PHP

A certain site I know recently upgraded their bandwith from 2,5 TB monthly to 3,5 TB. Reason is they went over the 2,5 limit recently. They're complaining they don't know how to get down the bandwidth usage. One thing I haven't seen them consider is the fact that JPEG and other images that are displayed on the site(and it is an image-h...

File upload kills rails app and server

I have simple model which looks like this: def video_file=(input_data) unless input_data.to_s.empty? newfile = File.open("#{RAILS_ROOT}/public/to_upload/#{self.filename}_vid.f4v", "wb") do |f| while buff = input_data.read(4096) f.write(buff) end end end end and here the error which rails manages to disp...

How can I limit file types in CGI file uploads in Perl?

I am using CGI to allow the user to upload some files. I just want the just to be able to upload .txt or .csv files. If the user uploads file with any other format then I want to be able to put out an error message. I saw that this can be done by javascript: http://www.codestore.net/store.nsf/unid/DOMM-4Q8H9E But is there a better way...

PHP upload code problem with permitted MIME file types...

Hi, I have a file (image) upload script in PHP that I use to upload and resize images... It uses a simple MIME type and size validation so only jpg images are allowed and 1MB max file size. I recently discovered a problem. When I try tu upload a .avi file using the script, the script processes the file like its the correct MIME type and...

Finding Uploads in Parameters on Submit in Rails

I'm trying to figure out which of these parameters contains an uploaded file. This code works params[:upload].each do | uploaded_image | if (uploaded_image[1] != "") # do something with uploaded_image[1]; end end but my way of moving through the parameters (with the [1], for instance) seems wrong. What's the right wa...

File Upload of more than 4GB

Hi, I wish to create an ASP.NET web application that allows upload of files up to a size of 4GB. How can I achieve that? I would prefer something like a "Download" manager where I can resume, pause etc... Is that possible? If so, where should I start? I think asp.net has a limit of 4mb upload or something? I am not too sure.. Plea...

File upload mojibake

How do you do a file upload in an HTML form without running into mojibake? I have a form that has three fields: a file field a required text field a text field which accepts Japanese characters I've set up my HTML form with the attribute enctype='multipart/form-data'. But when the form submission fails due to the missing required f...

'pass through' php upload to amazon's s3?

I've seen ways to upload files directly to S3 and I've seen ways to upload a file already on the server. I need to modify the file's name before sending it on to S3, but I don't want to store it locally and then upload it, if I can help it. Is there a way to put it in a buffer or something? Thx. ...

Can't delete a file from a client after uploading it to the server

I'm using asp:FileUpload control to upload a file to the server. Nothing fancy there, just FileUploadId.Save(); File gets uploaded successfully, and everything is fine until I try to delete that file on the CLIENT. I get a good-old "File is being used by another person or program" message. How do I make sure that file is not being a...

Trying to upload a file with ASP.NET MVC

I am trying to upload a file with ASP.NET MVC. The following code work perfectly fine: // Read in the image data. byte[] binaryData = null; HttpPostedFileBase uploadedFile = Request.Files["ImageFileName"]; if (uploadedFile != null && uploadedFile.ContentLength > 0) { binaryData = new byte[uploadedFile.ContentLength]; ...

How to store a file in the database with Grails

Hi, I need to store a file in the database using Grails. So, do you know how I can do that? Which data type should I use in the domain class (byte[] might be a solution)? ...

Can a long file upload be handled by a cluster of (Tomcat) servers where in if one server fails/crashes during the upload, another one picks it up

What happens when Tomcat fails during the upload process. Will it simply throw a 50X error. Is it possible to gracefully handle the server failure and forward the rest of the request to a different server. ...

SWFUpload Examples/Information and Java

I built a couple working examples that upload an image to the server and display it on the page without refreshing. One approach was the iframe method, and the other was DWR (version 3). I wonder if anyone has an example using SWFUpload. I am not quite sure how it hooks into the server side code. Thanks! ...