![upload a file and play using arraysync upload a file and play using arraysync](https://cdn.shopify.com/s/files/1/0557/6333/7306/products/Slide1_02458b48-3a39-48f6-96a4-705664de90a3_600x.png)
#Upload a file and play using arraysync update#
I am now looking at what HTML5 has to offer, and on the face if it, using FireFox rather than IE does offer multiple uploads with little javascript, although the asynchronous mode of the XMLHttpRequest onreadystatechange event handler doesn'tĪlways seem to update the web page.
#Upload a file and play using arraysync code#
I re-visited some of the more popular plug-ins, but their demo code always falls over somewhere. If you look at my request, I said I did not want to use FLASH or IFRAME, which many of the third party plug-ins use. Var imageList = document.getElementById("imageList") PageMethods.GetFilesUploaded(success, failure) Upload Multiple files using AsyncFileUpload UrlList.Add(VirtualPathUtility.ToAbsolute("~/Uploads/" + filename)) Protected void Page_Load(object sender, EventArgs e)įor (int index = 0 index GetFilesUploaded()ĭirectoryInfo d = new DirectoryInfo(("~/Uploads")) įoreach (var filename in (from f in files This is by no means a perfect solution, but much simple and less code and complexity than some of the offerings I have used this week
![upload a file and play using arraysync upload a file and play using arraysync](https://syshongkong.weebly.com/uploads/1/3/4/6/134679614/782053212_orig.jpg)
This sets attributes on the contained file input control within the rendered AsyncFileUpload controls which allows the multiple file selection in Firefox. The "key" line is "$( 'input' ).attr( "name" , You cannot use IE for multiple selection of files to upload, but FireFox will allow this.Ĭopy this page below - you will additionally need a scipts folder with the latest jQuery (athough you could replace the one line used with other javascript) and a folder into which files will be uploaded The AsyncFileUpload control to perform the select/trigger in one go I might have to resort to a two button process (file/post) instead. A problem I still have is that the AsyncFileUpload shows a bad upload, although files are uploaded OK. How simple a one-click solution could be.Īfter a few hours, I managed to get something working with minimal code. As part of my own investigation into this murky process, I decided to have a play with some code to see I am not keen on either iFrames or Flash components to perform any of the file uploads and I came back to using Ajax with partial postbacks.
![upload a file and play using arraysync upload a file and play using arraysync](https://cdn.shopify.com/s/files/1/0074/3142/2015/products/q7CVU3Tae4_2048x2048.jpg)
Which seems impossible to perform without a postback. My system also needs a dialog to be able to replace single files with other images, I need a multiple file uploader, and have expended the last week being disappointed by some small, but significant issues in many of the popular plug-ins for AJax/jQuery.