jquery-file-upload

Restrict filetype ,size,single upload doesn't work in jquery file upload

主宰稳场 提交于 2019-11-28 14:48:01
I am trying to use the blueimp jquery file upload plugin with Spring MVC to upload the excel files.The files are getting uploaded. I would like to restrict the file type to excel(xls,xlxs),also allow only single file uploads . I am using the parameters as recommended by the plugin, also tried adding the add: callback to perform the validation neither of it works . Any help please . The js file I'm using(in the same order) jquery.min.js <!-- The jQuery UI widget factory, can be omitted if jQuery UI is already included --> jquery.ui.widget.js <!-- The Iframe Transport is required for browsers

jQuery FileUpload doesn't trigger 'done'

笑着哭i 提交于 2019-11-28 10:46:19
I use jQuery-File-Upload plugin. I wrote a simple code to test it - and it works, but not without problems. It doesn't trigger done , even if the file is uploaded and progress bar reached its end. Here's the code: $('#file_file').fileupload({ dataType: 'json', autoUpload: true, add: function (e, data) { data.context = $('<p/>').text('Uploading...').appendTo(document.body); data.submit(); }, progressall: function (e, data) { var progress = parseInt(data.loaded / data.total * 100, 10); $('#progress .bar').css( 'width', progress + '%' ); }, done: function (e, data) { alert('Done'); } }); My input

Cannot remove files from file list using JQuery-File-Upload

穿精又带淫゛_ 提交于 2019-11-28 07:39:51
问题 I have an issue using the JQuery-File-Upload plugin. I am using the plugin directly and not through the author's provided html example pages. Basically I have a form with some inputs one of which is a file input. The first upload works fine but when I attempt a second upload both files are sent (the first one for the second time) when it should only be the second one. Example: File 1 is selected. File 1 is uploaded. Success. Using jquery I reset the form with $(FORM_SELECTOR).trigger('reset')

Vaadin with JQuery FileUpload

雨燕双飞 提交于 2019-11-28 06:11:06
问题 I would like to create FileUploader with Vaadin . But I need to get more features over normal Vaadin Upload. beautiful and easy to manage (but optional) fast and never failed while uploading include progress bar show preview multi file upload support upload file size and type restriction drag and drop client-side image resizable (it is main feature for me because all of my uploaded files were images) There has an addon MultiFileUpload. Yes , it is perfect for most of my requirements but not

Best Ruby on Rails Architecture for Image Heavy App

一笑奈何 提交于 2019-11-28 03:36:45
I'm building an application that allows for large amounts of photo uploads at once, and wanted to know what the best setup would be to tackle this. This is what I am using so far: Jquery File Upload: allows users to drag and drop images CarrierWave: Processes images and resizes them with ImageMagick Amazon S3: CarrierWave uploads images to Amazon S3 through Fog Heroku: for hosting I'd like to allow users to be able to drag and drop a large amount of images onto a page, and then navigate to other pages while the upload is going on in the background. I'd also like pictures to appear as they

Implementation of fully functional media uploading in web application

大兔子大兔子 提交于 2019-11-28 02:10:00
问题 Suppose we have the web application which handle create, read, update and delete articles and each article should have gallery of images. I have to make one to one relation between Article and Gallery and one to many relation between Gallery and Media. HTML5 gives a lot of features like multiupload, so I want to use this excellent http://blueimp.github.io/jQuery-File-Upload/ plugin for that. The problem is how to handle the file upload "in memory" like other form's data? For example when we

jquery file upload progress bar inaccurate

烂漫一生 提交于 2019-11-28 02:02:15
I am using jquery file upload ( http://blueimp.github.io/jQuery-File-Upload/ ) plugin. My Code: $('#fileupload').fileupload({ url: 'server/index.php', dataType: 'json', dropZone: $('#dropzone'), }).bind('fileuploadprogress', function (e, data) { var progress = parseInt(data.loaded / data.total * 100, 10); $('.progress-bar').css('width', progress + '%'); }); When I do the file upload, the progress bar is very inaccurate. Every time when I upload no matter what size the file is, the progress bar will always stuck at around 10% until the file is upload finish, then it will directly goes up to 100

Optional File Upload with Blueimp jquery file upload plugin

一曲冷凌霜 提交于 2019-11-28 00:33:05
问题 The question is related to jquery file upload plugin from blueimp I am building a form where the file uploads are optional. It turns out I cannot post form when there are no files selected for upload. Just because of this I have to create two forms on my page and do all the dirty checking to delete uploaded files if the user decides not to add actual data. The question is : Can I submit the form even if no files are selected so that i can still be able to receive the additional form data on

jquery file upload restricting number of files

廉价感情. 提交于 2019-11-27 22:50:46
I am using jquery file upload to upload the files to the server . I want to restrict the user to upload maximum 6 files . I search the wiki jquery file upload but didnt find the parameter for it . Is there any way that i can restrict the user on number of uplaods Use maxNumberOfFiles here is documentation : $('#fileuploadbasic').fileupload({ maxNumberOfFiles: 6 }); maxNumberOfFiles was not working for me so i did the following $('#fileuploadbasic').fileupload({ change : function (e, data) { if(data.files.length>=5){ alert("Max 5 files are allowed") return false; } }, maxFileSize: 20000000,

jQuery fileupload - get list of uploaded files

狂风中的少年 提交于 2019-11-27 21:01:25
问题 I'm using the very good jquery plugin blueimp / jQuery-File-Upload $('#fileupload').fileupload({ autoUpload: true , filesContainer: '#attachments_presentation tbody' , stop: function (e) { console.log(data); } }); And I'm not able to do something very simple: get the list of uploaded files (with their name on the server) Firstly I naively though it would be stored on the file input so I could get the list with $('#fileupload').val(); But it's not, so I though about something like $('