file-upload

File Upload Failing Mysteriously in CakePHP

I'm trying to upload a file to my server using the CakePHP file upload form helper. I am currently running CakePHP 1.3 on my development computer (Mac OSX). When the form submits, it has in the variables that are passed to the controller its temp name: /var/tmp/name and then its name as the name of the file. However, when I try to rename...

how can i find the content type of the file when user uploads it using java servlets

whenever user uploads the file i need to know the file content type using servlets ...

Client Path of uploaded file or image?

Here is what I am trying to make. Whenever a user browses a image from a file field. I want to grab the clients path and show it on the page so that user can be certain of what image he choosed, before uploading it. ...

Is that possible to display image thumbnail without uploading it to the server ?

I want let user to upload images to server add some info (like description, tags) about each image.I use Uploadify to upload multiple images. I wonder if it is possible to show thumbnails of the images (while the user enters the additional info about each image) before the images are actually uploaded to the server. I want user to have...

HTML5 File Upload Progress - Client Side Only

I have noticed that the new XMLHttpRequest object supports an 'onprogress' event in firefox. Is it possible to utilize part of the new HTML5 File api's to get an upload progress bar without any server-side modifications required? ...

Flex FileReference upload() and .data ... does this load the whole file into memory?

Hi all, I need to upload a very large file to my server, through my Flex application, and I see that Flex Filereference upload() seems to be able to handle it. Does the upload() methods uploads a 'stream' to the servlet, or does it sends the whole ByteArray (As I understand it, the ByteArray will have the whole file contents, so a >1Gb...

HTTP file uploading standard?

I'm writing a client in python to upload a file to a webserver I run. On the PHP side, it seems I should expect the file to arrive in the $_FILES variable, but I can't find any documentation on how that variable gets populated. I can find tutorials on how to create web forms to upload, but none of them tell me what the actual HTTP POST l...

ASP.NET Keep fileupload after postback

Hi, I'm writing an intranet ASP.NET page using VB.NET. I've run into a particularly nasty problem dealing with handling file uploads. I'll do my best to explain the problem, and perhaps someone can help. My problem is almost a duplicate of this one, or this one, except (other than the filename) I don't care about sending the file to th...

Will removing an iframe from the DOM always stop an upload POSTed from that iframe?

I'm doing some async file uploading with iframes, and I'm wondering if simply pruning the iframe from the DOM is enough to cancel an upload. This discussion seems to imply that this a poor approach to the problem overall, but annoyingly the JS `expert' refuses to reveal his solution. Anyway, removing the iframe works in Gecko + WebKit,...

Upload progress using javascript only

Is it possible to make a upload progress using javascript only? (maybe with some ajax to a server-side code) Having a form such as <form method="post" action="upload.html" enctype="multipart/form-data"> <p>Select file to upload: <input type="file" name="selected_file"></p> <p><input type="submit" value="Upload the file"></p> <div id="p...

image upload script in php

In my application a user can create his/her photo album. My question is how can I upload images specific to that user-id who has uploaded them? This means there should be some criteria that will indicate that these images belong to this user. What I was thinking that I can store images with the image name of the user-id, but in that ca...

Python file upload "KeyError"

Hi, Whats wrong in this code? Here is my HTML: <html><body> <form action="iindex.py" method="POST" enctype="multipart/form-data"> <p>File: <input type="file" name="ssfilename"></p> <p><input type="submit" value="Upload" name="submit"></p> </form> </body></html> This is my Python script: #! /usr/bin/env python import os, sys; from mo...

Flash file upload issue with Flash player 10.1

Hi, I have a file upload script to upload pictures to a server. It has been working fine in all browsers but when I upgraded the flash player to 10.1 in firefox 3.6.6 yesterday it stop working. I retested with another computer and as soon as i installed the flash player 10.1 it stopped working. I did some debbuging and noticed that the e...

Require upload of a file in HTML/PHP form

Hi, I'm trying to require a file upload in a form, but cannot get it to work. Any ideas? I'd rather echo the php error on the page vs. a javascript popup. Thanks for taking a look: <?php // initialize $file1 $file1 = $_POST['file1']; // check upload of $file1 if ($file1 == '' ) { $error = "Please upload an image"; } ?> ...

How to simulate sys.argv[1:] on web based python

Hi, I have a Python program where the initiation script looks like this: if __name__ == "__main__": main(sys.argv[1:]) To run this, I have to use Shell or Terminal like this: myscript somefile.xml The script accepts a file and then does all the rest of the work. Now, I am trying to run this program on a web server. SO I use a ...

C# .NET HttpWebClient can't get file upload working; troubleshooting hints?

Hi, I need to use HttpWebClient to upload a series of files at once. I am following the sample code found on this thread: http://stackoverflow.com/questions/566462/upload-files-with-httpwebrequest-multipart-form-data As several people reported on that thread, I am also getting HTTP status 500 errors. I have tried 2 of the solutions o...

Facing problem in creating dynamic file upload control in asp.net mvc?

Im creatng dynamic control of file upload so user can upload more than one file. But when i add more than 5 file upload control and submit the form. Error occured and shows The connection was reset The connection to the server was reset while the page was loading. what can be the issue? ...

XmlHttpRequest corrupts headers in Firefox 3.6 with "Content-Type:multipart/form-data"

I'm working on "multiple ajax uloader". Works fine in bleeding edge browsers (Chrome 6, Firefox 4). But in Firefox 3.6 I must manualy create output string to be sended, cos this browser doesn't support FormData object. I followed many tutorial, especialy this. Author notify about correct setup of headers & content of body to be sended. ...

Apache Commons File Upload - Stream ended unexpectedly

Well, I have to say that so far, this one has me stumped. Our web application, which is running in Tomcat 6.0.18 is failing during file upload, but only when the client machine is a windows machine, only for some machines, and for all browsers, not just IE. There is a stack trace in the logs, which seems to indicate that the client eith...

sqldatasource - UpdateParameters with image byte array

This is how you set the defaultValue with a string: sqlDataSource.UpdateParameters["Active"].DefaultValue = tbActive.Text; How do you do something similar to the code below so that my sqlDataSource can accept an updated image? FileUpload fuRoom1 = (FileUpload)gvRoom.Rows[e.RowIndex].FindControl("UploadedFile11"); byte[] image...