Archived from the Transloadit support forum. Originally posted on August 13, 2013; details may be outdated, see our docs for current behavior. Original thread
Hi Transloadit,
I really like your service and enjoy using the simple integration through jquery-plugin. But I run into trouble when trying to reuse the same <form> for multiple uploads. My application is a single-page-application and I do not want to reload the page after uploading a file to transloadit.
So I came up with this code:
$form
.attr(“enctype”, “multipart/form-data”)
.transloadit({
wait: true,
autoSubmit: false,
triggerUploadOnFileSelection: true,
onSuccess: function(assembly){
// post "assembly" data to remote server through $.ajax()
}
});
This works fine, but once the file is uploaded to transloadit, all elements in <form> (including the input[type=‘file’]) disappear (css display: none) and it is not possible to upload any further files without reloading the page.
What is the recommended way to upload a file multiple times through the same form without page reload, if this is possible at all.
Any help would be really appreciated.
Best regards,
Jan