I am trying to get this jquery tool to work with my website for file uploads: https://github.com/blueimp/jQuery-File-Upload and I have it working for the most part. The only issue I am having is trying to find a place where I can make it redirect to a new page to display the results of the upload instead of displaying them on the same page. I want to have the option for the users to do things with the images and files they just uploaded, and a new page makes more sense for this than using the same page over and over and over again...
Can anyone tell me from experience of understanding something in the documentation/code that I didn't grasp on how I can do this? Thanks :) Please note that i want the page to be redirected at the end of ALL of the uploads and not after the first if there are four more. I will be storing the data in a PHP session to access on the next page.
Should be like this (in this case redirecting to http://stackoverflow.com ):
<script>
$(function () {
$('#fileupload').bind('fileuploadstop', function (e) {/* ... */});
});
</script>
Check out the docs .
<script>
$(function () {
$('#fileupload').fileupload({
// ... additional parameters
complete: function (e, data) {
window.location = "http://www.stackoverflow.com";
}
});
});
</script>
The plugin has an events called onComplete
and onCompleteAll
. Use them.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.