file-upload

Using combination of File Size and Hash value of only first 20KB of a file to detect duplicates?

A project I'm working on requires detection of duplicate files. Under normal circumstances I would simply compare the file bytes in blocks or hash value of the entire file contents. However, the system does not have access to the entire file - only the first 50KB or so. It also knows the total file size of the original file. I was think...

Is file still being uploaded?

I have an app that I'm writing that takes files in a specific directory that have been uploaded via SFTP and moves them to S3. I have a problem where my cron job starts uploading a file when it's not completely uploaded. I have thought of every way to try and wait until the file is complete, but I have no way of knowing (that I know of)...

Prevent session timeout on big uploads

Pretty obvious from the title I guess :) Well, problem is that if user is uploading a big file, his session might timeout in that time. How could I prevent session timeouts? I am using Struts2 with AjaxUpload. ...

File upload with the ability to resume (preferably in Ruby on Rails)

Hi all - this is quite a difficult topic by all accounts. I am building a website that requires users to upload large (multi-GB). What is the best way allow users to upload a file on a website and allow the file upload to be resumed should it fail? What is the way to write this in rails? Any ideas greatly appreciated. Max. ...

PHP upload image to one directory from multiple pages.

I have a script that is uploading images to my site, it works locally (haven't even tested it on the web server yet) but the problem is that I can't figure out how to get it to upload the images to a central location no matter where the script is run from. For example my site structure looks like this: /ROOT/ /IMAGES/ /USER/ ...

Upload problem with PHP: Thumbnail picking up the image name.

I have the following model(codeigniter) code to upload image and thumbnail. However the result of image path becomes, images/comfort_big.jpg and images/comfort_big.jpg.jpg. The thumbnail image picks up the name of image and add .jpg. I am uploading images/confort_thumb.jpg for thumb. Can anyone tell me what's wrong please? if ($_FIL...

csv file upload

Hi, In my Grails app, I would like admin users to be able to upload a CSV file that contains data such as: List of users to be added to system List of groups to be added to system Assignment of users to groups I have no idea how the user will generate these CSV files - most likely from Excel, Access or similar, and therefore I've no...

Multiple file upload with ASP.NET MVC & jQuery Multiple File Upload Plugin

I'm using jQuery Multiple File Upload Plugin to upload several pictures. But form posts only 1, top, item. Fiddler (POST): POST /Images/UploadImages HTTP/1.1 Host: localhost:4793 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.6) Gecko/20091201 Firefox/3.5.6 Accept: text/html,application/xhtml+xml,application/xml;q=...

upload file via python script

Hello, I want to upload a file from my computer to a filehoster like hotfile.com via a python script. Because Hotfile is only offering a webbased-upload service (no ftp) I need python first to login with my username and password and after that to upload the file. When the Filetransfer is over, I need the Download and Delete-link (which i...

Drupal: File upload required?

For some reason, my form breaks when I try to make a file upload required. Here is the code for it: $form_id = "upload_form"; $form[$form_id] = array ( '#type' => 'fieldset', '#description' => t('This is a utility to import nodes from a Comma Separated Value file. To begin, pick a node type, and upload a CSV.'), ); $form[$form...

Accessing input type file at server side in asp.net

I am using the <input type="file" /> tag to upload a file to the server. How do I access the file at the server side and store it at the server? (The file is an image file) The client side code is : <form id="form1" action="PhotoStore.aspx" enctype="multipart/form-data"> <div> <input type="file" id="file" onchange="preview(this...

How to download word document stored in database as content data in sql server??

How to download a word document which is stored in database, sql server as a content data through C#? This is my Code I'm using: string doctype = dtResumeInfo.Rows[0]["ContentType"].ToString(); string docname = dtResumeInfo.Rows[0]["FileName"].ToString(); // try { Respons...

Python ftplib: Overwriting a File doesn't work with STOR

I want to overwrite an existing file "test.txt" on my ftp server with this code: from ftplib import FTP HOST = 'host.com' FTP_NAME = 'username' FTP_PASS = 'password' ftp = FTP(HOST) ftp.login(FTP_NAME, FTP_PASS) file = open('test.txt', 'r') ftp.storlines('STOR test.txt', file) ftp.quit() file.close() I don't get any error messages a...

Photo crop after upload functionality

Once I upload an image to the server (asp.net), I need to display this uploaded image for cropping. What is the best-practice to achieve the same(ie how do I send te image back to the client for display)? . I have tried giving a preview option before upload. But this does not seem to be working for all images. See here Addition : [I kno...

Create Upload progress bar in pure PHP

Hi all, I want to create Upload Progress bar Using simple and pure PHP Thanks in Advance NewBie ...

Restricting open dialog box to certain files using javascript.

When uploading photos and videos, the open dialog box should default to file suffixes that are relevant. e,d when i uploading images, it should show only file with extension .jpeg, jpg, gif, png, bmp etc. And same with videos.. Thanks. ...

PHP image upload and resize error

Hi there, I looked the site to find a solution for my problem, but couldn't find the answer. Hopefully someone can help me with this: I have a script that uploads and resizes an image without pagerefresh. I found it on the internet and adjusted it for my use. The script can be found underneath. My problem: First the upload.php script...

Image upload functionality with preview

I have to implement an image upload functionality in asp.net. The method I have followed works like this :- Submit a form containing an <input type='file'> element and set the target of the form to a named iframe[to give the impression of a Ajax request/response ]. The aspx file which this form is posted to, writes the image into the re...

PHP Form - download to zip

I have the following form: <form action="download.php" method="get"> <input type="checkbox" name="file1" /> File1 <br/> <input type="checkbox" name="file2" /> File2 <br/> <input type="checkbox" name="file3" /> File3 <br/> <input type="checkbox" name="file4" /> File4 <br/> <input type="checkbox" name="file5" /> File5 <br/> <input type="...

Progress Indicator With FileUpload control

I have a web page which I want people to be able to upload content to. (There will only be a small number of people using it, as it is access restricted, so I'm not too worried about any DOS type attacks.) I'm using a fileUpload control to do this: protected void Button1_Click(object sender, EventArgs e) { if (fileUploader....