mirror of
https://github.com/wintercms/winter.git
synced 2024-06-28 05:33:29 +02:00
Set Dropzone.js uploaders to have no time limit (#4878)
The upgrade to the latest Dropzone.js brought in a new `timeout` configuration variable, which defaults to 30s. This removes the time limit and restores original functionality. Fixes #4869
This commit is contained in:
parent
0bbc12af45
commit
c046466913
@ -104,6 +104,7 @@
|
||||
previewsContainer: this.$filesContainer.get(0),
|
||||
maxFiles: !this.options.isMulti ? 1 : null,
|
||||
maxFilesize: this.options.maxFilesize,
|
||||
timeout: 0,
|
||||
headers: {}
|
||||
}
|
||||
|
||||
|
@ -276,7 +276,7 @@ this.scrollContentElement.insertBefore(this.selectionMarker,this.scrollContentEl
|
||||
MediaManager.prototype.doObjectsCollide=function(aTop,aLeft,aWidth,aHeight,bTop,bLeft,bWidth,bHeight){return!(((aTop+aHeight)<(bTop))||(aTop>(bTop+bHeight))||((aLeft+aWidth)<bLeft)||(aLeft>(bLeft+bWidth)))}
|
||||
MediaManager.prototype.initUploader=function(){if(!this.itemListElement||this.options.readOnly)
|
||||
return
|
||||
var uploaderOptions={clickable:this.$el.find('[data-control="upload"]').get(0),url:this.options.url,paramName:'file_data',headers:{},createImageThumbnails:false}
|
||||
var uploaderOptions={clickable:this.$el.find('[data-control="upload"]').get(0),url:this.options.url,paramName:'file_data',timeout:0,headers:{},createImageThumbnails:false}
|
||||
if(this.options.uniqueId){uploaderOptions.headers['X-OCTOBER-FILEUPLOAD']=this.options.uniqueId}
|
||||
var token=$('meta[name="csrf-token"]').attr('content')
|
||||
if(token){uploaderOptions.headers['X-CSRF-TOKEN']=token}
|
||||
|
@ -715,6 +715,7 @@
|
||||
clickable: this.$el.find('[data-control="upload"]').get(0),
|
||||
url: this.options.url,
|
||||
paramName: 'file_data',
|
||||
timeout: 0,
|
||||
headers: {},
|
||||
createImageThumbnails: false
|
||||
// fallback: implement method that would set a flag that the uploader is not supported by the browser
|
||||
|
@ -150,6 +150,7 @@
|
||||
paramName: 'file_data',
|
||||
previewsContainer: $('<div />').get(0),
|
||||
clickable: $link.get(0),
|
||||
timeout: 0,
|
||||
headers: {}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user