2
0
mirror of https://github.com/Ionaru/easy-markdown-editor synced 2025-09-24 16:40:55 -06:00

Update easymde.js

Remove absolute URL when we upload picture
This commit is contained in:
Qwerty 2019-08-30 14:29:03 +02:00 committed by GitHub
parent 94750c8327
commit 8ae735f110
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2077,7 +2077,7 @@ EasyMDE.prototype.uploadImage = function (file, onSuccess, onError) {
return; return;
} }
if (this.status === 200 && response && !response.error && response.data && response.data.filePath) { if (this.status === 200 && response && !response.error && response.data && response.data.filePath) {
onSuccess(window.location.origin + '/' + response.data.filePath); onSuccess(response.data.filePath);
} else { } else {
if (response.error && response.error in self.options.errorMessages) { // preformatted error message if (response.error && response.error in self.options.errorMessages) { // preformatted error message
onErrorSup(fillErrorMessage(self.options.errorMessages[response.error])); onErrorSup(fillErrorMessage(self.options.errorMessages[response.error]));