Skip to content
This repository was archived by the owner on Sep 11, 2020. It is now read-only.

Commit 5732132

Browse files
committed
Merge pull request #263 from jackyzhai/add_fileDeleteOptions
add fileDeleteOptions
2 parents 42c7d1a + 5cf44b7 commit 5732132

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
"name": "Pavel Linkesch",
1313
"url": "http://linkesch.sk"
1414
},
15+
"main": "dist/js/medium-editor-insert-plugin.js",
1516
"devDependencies": {
1617
"grunt": "~0.4.4",
1718
"grunt-autoprefixer": "^3.0.1",

src/js/images.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
url: 'upload.php',
2020
acceptFileTypes: /(\.|\/)(gif|jpe?g|png)$/i
2121
},
22+
fileDeleteOptions: {},
2223
styles: {
2324
wide: {
2425
label: '<span class="fa fa-align-justify"></span>',
@@ -525,11 +526,11 @@
525526
// If deleteMethod is somehow undefined, defaults to POST
526527
var method = this.options.deleteMethod || 'POST';
527528

528-
$.ajax({
529+
$.ajax($.extend(true, {}, {
529530
url: this.options.deleteScript,
530531
type: method,
531532
data: { file: file }
532-
});
533+
}, this.options.fileDeleteOptions));
533534
}
534535
};
535536

0 commit comments

Comments
 (0)