file-upload

How can I *make* this image refresh after it is uploaded

I am permitting administrative staff on an ASP.NET web site to upload pictures of themselves for display to the users of the site. It isn't hard: just use basic file uploading controls: <img src="<%#ImageFile%>" border='0' width="150" alt="" height="150" /> <-- Displays the image <br /> <br /> Upload Picture: <input id="myFile" type="f...

Mootools - How to create a form and submit this form ?

My idea : when click a filename will get the path of file , then create a form and submit this form, but i don't know how to submit , when submit , undefined form cause elements was created at same time help me, thank ! <p onclcick='startUpload(this.value)'>PATHTOFILE<p> function startUpload(file) { var form = '<...

Zend_File_Transfer_Adapter_Http Extension Validator

I have the next code: $currFile = new Zend_File_Transfer_Adapter_Http(); $currFile->addValidator('Extension', false, 'jpg'); It works pretty. But if I put array('jpg','png') instead of 'jpg', only files with jpg extendion works. How can I set more than 1 extension. Thank you for your help. ...

Copying a file from a temporary tomcat folder using java.

Basically my problem is a that I need to copy an uploaded file (which is placed in a temporary folder on my server providers Tomcat ie. not a local Tomcat). The code I'm using works when I deploy my project on my local machine but stops working when I deploy it live. I've found out that it has something to with my permissions in java.po...

How to read inputstream from HTML file type in C# ASP.NET without using ASP.NET server side control

I have the following form <form id="upload" method="post" EncType="Multipart/Form-Data" action="reciver.aspx"> <input type="file" id="upload" name="upload" /><br/> <input type="submit" id="save" class="button" value="Save" /> </form> When I look at the file collection it is empty. HttpFileCollection Files ...

Uploading a file with cfhttp appends a newline (even on binary files)

Update: I've found a workaround. If I submit a dummy form field along with the file, it works. Is this a ColdFusion bug, or is there something in the HTTP spec that says forms must contain at least one non-file form field? Update 2: I'm convinced this is a ColdFusion cfhttp bug. This is based on Leigh's answer and the fact that I used t...

Symfony: Images still save in web/uploads after I changed web root to public_html

In my symfony project, I changed my webroot directory to public_html to fit with a specific host. However, in the admin generator, when saving a file, the system creates a web folder, then stores the image in web/uploads How can I tell the system to now save in public_html instead? ...

Verifying a CSV file is really a CSV file

I want to make sure a CSV file uploaded by one of our clients is really a CSV file in PHP. I'm handling the upload itself just fine. I'm not worried about malicious users, but I am worried about the ones that will try to upload Excel workbooks instead. Unless I'm mistaken, an Excel workbook and a CSV can still have the same MIME, so ch...

Django ModelForm Ajax Upload

I'm using an Ajax code for uploading files. Django takes good care of file uploads on ModelForms. Just writing form.save() would upload any file data in the header, manage creating the folders if needed and even rename the file if a duplicate already exists. Take this ModelForm which only has one filed named file for example: class Uplo...

PHP upload images form + resize through GD library. But it fails over 8mb

I make a php script that receive from POST 4 image, than store them and create the thumbs trought GD php library. The problem is that it works only if i load 2 photos 4mb each (or 4 photos 2 mb each, or less; in fact max 8 mb). why? i check the value of memory_limit (64mb), upload_max_filesize (25mb) and max_file_uploads (120secs), and i...

Trouble uploading files in PHP

I am trying to upload files using php, and it works perfectly up until 1Mb, I already checked the forum and saw that the common thing missing was to edit this values on php.ini (I am using WAMP): post_max_size = 8G upload_max_filesize = 2G as you can see I already changed them up to Gigabytes and still it isn't working, what happ...

why are images returning filesize = 0 when being uploaded?

I have a php form that uploads files, and all files work good the limit size is set at 7340032 bytes (7Mbs) and it works ok, however when I try to upload an image larger than 500kbs when I echo the values of the first if: if(isset($_POST['upload']) && $_FILES['userfile']['size'] > 0){ it says the image size is 0 everytime, why would t...

Creating custom file dialog for bulk photo upload

Is it possible to customize the "Browse UI window" which always open when we upload photos / files? I want to acheive two things: In the bottom it always says "All Files". I want to lock that to only .jpg, .jpeg, .png so only those files types can be selected for upload. Secondly extent that box so when the upload is complete the previe...

Problem with Spring FileUpload

I have the following block of code which is handling my file upload of a photo that I am using in my Spring MVC web application. I am using Spring MVC CommonsMultipartFileResolver to handle file uploads. if(model.getPhoto() != null){ if(!model.getPhoto().isEmpty()){ MultipartFile file = model.getPhoto(); String fileN...

php: Any function to know when files is uploaded

hi all, I am making a crone file which will detect the file uploaded before 24 hrs and delete them. I want to know how can I detect the time of file uploaded, So i can calculate it's uploaded time and delete it. ...

Access 2007 to SQL server file upload?!

I have an Access 2007 database with an attachments facility. Currently the client may upload files locally but the files cannot be accessed elsewhere. I have been able to carry out a similar operation when developing on a web based system however I cannot seem to do it on an Access 2007 database and I am unsure as to whether it is even p...

upload video using FTP

Hello, I have a module which can record a video using iphone camera... and can upload that video using FTP ? I am unable to upload video file using FTP. Any ideas ? ...

Carrierwave or Dragonfly

I have been looking into rails file upload tools and the ones that seemed the most appealing and interesting to me were carrierwave and dragonfly. From looking around it seems like carrierwave takes the more traditional style where you can process the file on save whereas dragonfly is middleware so it allows you to process on the fly. ...

PHP: How to sanitize uploaded filenames?

I have a PHP application. I allow users to upload files to my web application. Question: What's the best way for me to sanitize the file names of the uploaded documents $_FILES["filename"]["tmp_name"] in PHP? UPDATE: Can I take an MD5 of the uploaded filename and use that as the newly assigned filename? If so, how do I do that in PH...

Flex Multipart Upload Progress

I am uploading a file to a server using a multipart URLLoader. I am able to upload the file fine. I have tried to listen to the progress event on the URLLoader but it only fires at the very end of the upload. How do I get the progress event more consistently through the upload? ...