Carl's File Uploader - A nice little file uploader for HTML/JS/JQuery/WebAPI
Carl's File Uploader is available at http://franklins.net/CarlsFileUploader_1.1.zip
Carl's File Uploader is a browser based asynchronous file uploader with progress reporting and auto-resume. It requires HTML5, client-side JavaScript and JQuery, and Web Api (C#) on the server.
To test:
1) Create a new Web project in VS 2012
2) Select the Web API template
3) Add CarlsFileUploader.js to the Scripts folder
4) Add FileUploadController to the Controllers folder
5) Add index.html to the project and make it your startup page
6) Create a file folder to accept uploads, and give asp.net write permission.
You can do this easily by granting full access to AuthenticatedUsers
7) Edit web.config and add the following, pointing to your upload folder:
8) Run the project
9) Select one or more files and press the upload button
10) Enjoy
Carl Franklin
carl@franklins.net
June 20, 2013
Reader Comments (4)
So, I happened to check out your twitter feed after listening to a recent DnR on Azure. I found this link on your website, and this looked like something I am looking for at the moment. Developing a PoC for a new client using Web API and I need a file uploader... :)
I'll check it out.....
Carl's got Chops, what can you say!
Hi,
Was playing with this.. some time, when you upload a file, a packet gets "lost" and the resulting file is uploaded but corrupted.. You don't get any errors on the client nor the server... really odd?
Don't suppose you know why that could be / point me in the right direction?
Awsome utility....
Hi Carl, Love your show(s)! Listen to one mostly at least once a week. I heard about your file uploader a while back, and now finally an enhancement came up where I decided to try it out.
I followed the precise instructions above (/in the readme) but got no results until I noticed:
1. The js file in the current .zip to download has filename 'CarsFileUploader.js'. And you including 'CarlsFileUploader.js' in your code. E.g. there's an L missing :).
2. The used jQuery 1.7.1 is not included in the zip file. So you might wanna do that, or add an instruction to the list for other dombo's like me. E.g. to download it - for instance at http://code.jquery.com/jquery-1.7.1.min.js - and then add it in the 'Scripts' folder as well.. :).
Well it worked like a charm after those two fixes. You're brilliant! Now to incorporate this into my main app... :)