Giter Club home page Giter Club logo

jquery-file-upload.mvc3's Introduction

Stand With Ukraine

jQuery-File-Upload.MVC3

This is an example of how to integrate a jQuery-File-Upload plugin into an ASP.NET MVC 3 application.

It is identical to the original plugin demo and supports batch upload, download and deletion of uploaded files.

Currently MVC Actions are not used to handle upload/download/delete in the demo, due to the inability for a developer to set a maxMessageLength per location in ASP.NET MVC application. IIS by default allows POST messages no londer then 5MB. This does not allow to upload large files, casting an implementation useless. Or, you can sacrifice security and just enable maxMessageLength for an entire site, which I personally wouldn't do.

This given, a HttpHandler implmentation is introduced. (thanks go to Iain Ballard and his ASP.NET handler-based demo)

main.js is initialized with large-files in mind, and a thumbnails are smart enough to disaplay everything correctly, so go ahead, take a look and fork if you wish.

jquery-file-upload.mvc3's People

Contributors

jtothebell avatar maxpavlov avatar njfsilva avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

jquery-file-upload.mvc3's Issues

cancel upload not working as expected

Hi,

Can you clarify what the limitations of the cancel upload is?

For me it seems as if I don't hit the cancel button literally same second as i click start the file will be uploaded regardless. This issue is more more prominent when uploading small files.

Regards,

Setting maxMessageLength local to a specific controler on MVC 4

Hi

Thank you very much for the work you are doing. I am attempting to use this in an MVC 4 based web site and need to do very large uploads, possibly up to 1GB video files of training sessions. In addtion I would like to have a number of descriptive fields to be used in a database go along with the upload.

Basicly the use case is as follows;

A small form where the admin selects a file (possibly as large as 1GB), enters a title value (not filename), a description, a few file type classifiers (archive, video, etc...). Upon submission all the data is sent. When the server succesfully finalizes the storage of the upload a database entry is added to the DB with the associated info. In the case of upload failure no DB entry is made and the admin is notified.

I would like to keep the concept in MVC and not use a HTTPHandler if possible(personal bias). I could easily create the File upload functions on a dedicated controler with its own associated security since this is only for the site admin to use. The issue seems to be around the maxMessageLength in MVC. I agree that it is a bad idea to set a huge maxMessageLength value for the entire site, but would it be possible to set an apropriate value on a location for JUST that controler? I have been beating my head against the wall on this issue and was hoping you had some thoughts.

I am doing this all in VS 2012 with .NET 4.5 & MVC 4 and the site is running on IIS 7.5.

Thanks,
Doug

Demo with Latest versions of Jquery File Upload plugin js files ??

Hi There, Great work on creating this Demo.
But is there a way to update the demo with latest versions of Jquery File Upload plugin files like (jquery.fileupload.js , jquery.fileupload-ui.js). Please post here if there is any other demo with latest versions. The issue in this demo is in IE browser, I have to double click to select files, which is fixed in the later versions of jquery file upload.

BUG with consecutive multi file upload in MVC3 sample

There is a bug when trying to upload multiple files selected in the MVC3 sample (https://github.com/maxpavlov/jQuery-File-Upload.MVC3). These are the steps to reproduce it:

  1. in main.js add "autoUpload:true" when initializing widhet: $('#fileupload').fileupload({ autoUpload: true });
  2. go to sample page
  3. click on "+ Add Files" and select any 3 images (selecting 1 or 2 will work, you must select 3) to upload (i used jpg) -> images will be auto loaded as they should
  4. now click on "+ Add Files" and try to upload additional 1, 2 or 3 images -> doesn't work. seems like it breaks in the "add" function

if also happens when autoUpload = false but it takes a while and it's not so easy to reproduce.

demo page seems to work fine. i've tracked it down to the "add" function in jquery.fileupload-ui.js file (line #80)

any ideas?

MVC4

How is your progress with updating it to work with MVC4 going?

Need help with adding functionality

I'm spending way too much time on figuring this out and would like to hire someone as a consultant to help (1) implement some additional functionality and (2) fix a couple of problems.

App is in MVC4. Attached is screenshot of File-Upload as implemented so far.

Below is a list of things that are needed.

Enhancements needed:

  1. Trigger form validation on click of “Add Files” button prior to allowing user to add files (if form not valid then cancel process of adding files)
  2. Assign an auto-generated filename to the upload (rather than user’s file name)
  3. Add information to database about upload on completion (I have a class to do this, just need a hook to call the function, preferably from the “Upload File” button)

Implementation fixes needed:

  1. Image returned after file upload is very large
  2. Slideshow not working (when click on image it simply downloads)

upload_screenshot

Thanks. If anyone interested let me know. Happy to pay for help.

Pat

Show uploaded files

Hi, i want to implement this fantastic code in my MVC3 aplication. But when i refresh the page, the uploaded files dont appear anymore. Can anyone help me with this? I just want to show the uploaded files.

Thanks.

Inconsistent Results with MaxChunkSize and Multiple File Uploads

Reported on the Google Group here: https://groups.google.com/forum/?fromgroups#!topic/jquery-fileupload/e6IWsEy5oaI

If I set MaxChunkSize and upload multiple files, then I wind up with inconsistent results, depending on the size of the files and their order:
•If the first of N files is larger than the maxChunkSize, then only the first file gets uploaded.
•If the first of N files is smaller than the maxChunkZize, then all the files get uploaded successfully.

Also, if I upload a file that's larger than the max chunk size, and the SaveTo path already has a file of the same name, then instead of replacing that file, it just appends to that file, such that if the file is 40K in length, then every time I upload it, it increases in size by 40K.

Thanks.

Rename file

Hello,

It's not a issues but I can't create a "Pull Requests".

Is it possible to change name of the file when saved in /Files ? Example, I add pictures for a product, this product as a code, I'd like select an (or more) image and then place in the folder /Files Code+Timestamp

Thanks,

License?

Hi -

Could you tell me if this code is published under any license? We'd like to use it here at Purdue University for a project for mobile curriculum. Please advise. Thank you!

Template loading and jQuery(document).ready issue

Is there a way to know when the templates finishing loading?

I need to add some jquery logic to the template results, but jQuery(document).ready is firing before the templates load so do not have a way to interact wit the results.

I'm wanting to add drag and drop support of the uploaded images.

thanks.

Files Larger than about 2MB Upload but gives Internal Server Error

Hi there,
Hi there, what could this be caused by? I have the maxRequestLength set much higher. The file gets uploaded to the server but then it comes back with "Internal Server Error"... doesn't matter the file type... jut the size.

I am not using any of the picture preview stuff, nor the thumbnails. Most of the infrastructure is still there for it, but the templates don't refer to it anymore.

Environment is Win2008 Server; MVC3

initial state of loading files in StorageRoot

Hi, great code!

I want to implement this for loading files in specific folder at inicial state. To see a grid with submited files and can use slider with them, also your control can add more fles, etc.
Its difficult to implement?

Regards

Vadim

Can't show uploaded file on IE browser

Hello,

It's a great project, thank for your sharing.

I am a newbie with this tool.

I used IE9 or higher to upload file, and I can't see uploaded files showed in the page.

So, I have no idea to solve it.

I need to help!

Thanks,

AllenStyle

Issues in IE and Opera

Thanks for your work on this. I just wanted to let you know that when I try to use it in either IE or Opera, the browser tries to download the file. I think I have fixed the issue, but I had to do a pretty significant refactor. I started with some helper methods from i-e-b's regular ASP.net example (https://github.com/i-e-b/jQueryFileUpload.Net). There may be a better way to do it, but let me know if you would like me to fork/check in those changes.

multiple file selection not working in Safari.

Hello,

Thanks for such usefull demo....!!!! :-)
I am facing one issue in safari.
I m using safari (5.1.7). when i select multiple files to upload, all files get added in the list but with the size "0.00 KB". and thumbnails for image is also missing.

It works very well in mozilla firefox.

How to load images from server to Jquery File Uploader

I'm using mvc5. I can upload images to server, to a custom folder.
Now I want to get images from that folder to file uploader when page is loading.
I don't understand how to do it. There is a template-download and I can't put image objects to it.

File Uploads from iPhone or Android Get Resized to 80 x 60

We've integrated this with a public facing site that we maintain. The site has a complaint form that allows the user to upload supporting files. When the form is submitted from an iOS or Android device, the uploaded files get resized 80 x 60, making them difficult to view. Is there support for file uploads from a mobile device?

Uploading large files

So, why are we not supposed to use the methods in HomeController for uploading large files? And what should we use instead?

Licence?

What is the license for this code? Could this be added to the Readme?

Thanks,
Elijah

File download not working in solution

Greetings,

after finishing uploading files - you can't see it or download (IIS SERVER 404 from UploadHandler.ashx),
but they appears in File folder.

I've used jQuery-File-Upload.MVC3.sln without any modifications.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.