jQuery file upload: Is it possible to trigger upload with a submit button?

前端 未结 8 2313
走了就别回头了
走了就别回头了 2020-12-01 01:40

I\'m using jQuery file upload for AJAX-based uploads. It always starts uploading after a file is selected. Is it possible to change the behavior to use the \"submit\"-button

8条回答
  •  悲哀的现实
    2020-12-01 02:07

    You can also find in jquery.fileupload.js

    There is an 'autoUpload' option in line 142.

    uploadedBytes: undefined,
    // By default, failed (abort or error) file uploads are removed from the
    // global progress calculation. Set the following option to false to
    // prevent recalculating the global progress data:
    recalculateProgress: true,
    // Interval in milliseconds to calculate and trigger progress events:
    progressInterval: 100,
    // Interval in milliseconds to calculate progress bitrate:
    bitrateInterval: 500,
    // By default, uploads are started automatically when adding files:
    autoUpload: true    // <<---------- here
    

提交回复
热议问题