File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change 235
235
if ( this . status === 201 && response && ! response . error && response . mediaID > 0 && response . size > 0 ) {
236
236
onSuccess ( response ) ;
237
237
} else {
238
- if ( response . errors ) { // server side generated error message
238
+ if ( response . errors || response . message ) { // server side generated error message
239
239
onErrorSup ( parseServerErrors ( response ) ) ;
240
- } else { //unknown error
241
- console . error ( 'EasyMDE: Received an unexpected response after uploading the image.'
242
- + this . status + ' (' + this . statusText + ')' ) ;
243
- onErrorSup ( fillErrorMessage ( self . options . errorMessages . importError ) ) ;
240
+ } else {
241
+ //unknown error
242
+ console . error ( 'EasyMDE: Received an unexpected response after uploading the image.'
243
+ + this . status + ' (' + this . statusText + ')' ) ;
244
+ onErrorSup ( fillErrorMessage ( self . options . errorMessages . importError ) ) ;
244
245
}
245
246
}
246
247
} ;
557
558
sbOnUploaded : 'Uploaded #image_name#' ,
558
559
sizeUnits : ' B, KB, MB' ,
559
560
} ,
560
- uploadImage : true ,
561
+ uploadImage : canUpload ,
561
562
imageMaxSize : maxUploadSize , //Maximum image size in bytes
562
563
imageAccept : allowedFileMimeTypeWithExts , //A comma-separated list of mime-types and extensions
563
564
imageUploadFunction : customUploadImage ,
You can’t perform that action at this time.
0 commit comments