ajax-upload

Valums qq.FileUploader doesn't work when it's initialized after loading button by ajax

社会主义新天地 提交于 2020-01-25 08:36:25
问题 I use Valums qq.FileUploader(ex-AjaxUpload) plugin for uploading in my Asp.net mvc 3 application... I have some button in my page add-newimage , and by clicking in it I get modal window, and I load data into that window by loading Partial View. And in that partial view I have button upload-image , in which I want to initilaize my qq.FileUploader, but it doesn't work anywhere... Here is code $("#add-newimage").click(function () { $("#add-image").load('/Design/AddImage/', function () { $("#add

Creating image from base64 string in NodeJS

拜拜、爱过 提交于 2020-01-22 19:17:59
问题 I am trying to upload an image that I extract from a my canvas and post via ajax, and I have trouble creating the image file on my server side. I have following this answer: https://stackoverflow.com/a/7347358/1358670 but still I seem to miss something here or there. Here is my javascript (browser) code: var img = myCanvas.toDataURL("image/jpeg"); // ajax request to send the image and in server side, I do the following: var fd = fs.openSync('./img.jpeg', 'w'); req.body.image = req.body.image

How to distinguish folders and files drag and drop Ajax upload in FireFox

♀尐吖头ヾ 提交于 2020-01-03 02:25:10
问题 I can not find the way to distinguish between folders and files drop in FireFox Ajax. Looks like there are no signs in FireFox FileAPI that can tell if this is a folder or a file. However I see that Google docs somehow can distinguish between folders and files drop. It does not relie on extensions or file length, files without extensions are uploaded correctly, as well as 0-lenth files are uploaded with no problem. How do I distinguish between files and folders during D&D in FF? 回答1: This

Valums Ajax Uploader (Mutli) - Detect when all files are uploaded

一曲冷凌霜 提交于 2020-01-01 08:21:48
问题 I am using the Valums Ajax Uploader to upload a batch of files. We recently changed the code from a single-upload a multi-upload type. This has raised a problem with our code. As you can see, when the onComplete event fire, we reload the page to show newly uploaded images. However, the onComplete event seems to be firing after EACH file completes, and not after the entire batch does. This now causes a problem because when the first file finishes, the page reload attempt is fired and the

jquery form plugin, no error handling

ぃ、小莉子 提交于 2019-12-18 10:44:27
问题 It seems that there are no error handling facility in the Jquery.Form plugin, which is very frustrating. Even though the documentation says we can use the $.ajax options, I still cannot make use of the 'error' option when the server returns an error, especially the 500 and 400 series. Is it that this plugin cannot handle any error at all from the server or is it a bug, etc? Can someone please tell me how I can handle errors (400, 500, etc) with this plugin? I need your help... All I want is a

IE: input type=“file” multiple

怎甘沉沦 提交于 2019-12-18 07:39:13
问题 How come IE 9 does not support input type="file" multiple like other browsers do? <form action="#" method="post" enctype="multipart/form-data"> <input type="file" multiple name="uploads[]" /> <input type="submit"/> </form> How can I make it work on IE? 回答1: Uploading multiple files is a specific part of HTML5 that none of the Internet Explorers support. 回答2: IE should support multiple according to this doc: http://msdn.microsoft.com/en-us/library/ie/hh772307(v=vs.85).aspx But even so, their