javascript - Blueimp multiple input elements with their own urls -
so have multiple input elements use blueimp upload files , folders, each having own link path on server. each element intended upload files respective urls, do; however, want them upload independently upon drop of file/folder. instance, if drop folder onto first input element, element solely uploads files url , no other input element triggers/uploads; however, behavior i'm getting if drop folder on one, upload folder.
here's example of current form , inputs like:
<form name = "self" action = "http://localhost/proj/index.html" method = "post"> <input class="fileupload" id="fileupload0" type="file" name="files[]" multiple> <input class="fileupload" id="fileupload1" type="file" name="files[]" multiple> <input class="fileupload" id="fileupload2" type="file" name="files[]" multiple> </form>
these created , initialized in loop in php, inside looking this:
echo "<input class = 'fileupload' id ='fileupload$numinput' type='file' name='files[]'multiple>"; echo "<script>init($numinput, $myuniquelink)</script>"; $numinput++;
$myuniquelink changes in loop.
here's how initialize them:
function init(num, link) { $(function () { $('#fileupload' + num).fileupload({ maxchunksize: 10000000, datatype: 'json', url: link, }); }); }
Comments
Post a Comment