mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-25 19:26:31 -05:00
Merge pull request #772 from SISheogorath/fix/chromeFileError
Some fixes for inline-Attachments in Codemirror
This commit is contained in:
commit
fa4a8418af
1 changed files with 7 additions and 4 deletions
|
@ -131,7 +131,7 @@
|
||||||
* Extension which will be used when a file extension could not
|
* Extension which will be used when a file extension could not
|
||||||
* be detected
|
* be detected
|
||||||
*/
|
*/
|
||||||
defualtExtension: 'png',
|
defaultExtension: 'png',
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* JSON field which refers to the uploaded file URL
|
* JSON field which refers to the uploaded file URL
|
||||||
|
@ -220,7 +220,7 @@
|
||||||
xhr = new XMLHttpRequest(),
|
xhr = new XMLHttpRequest(),
|
||||||
id = id,
|
id = id,
|
||||||
settings = this.settings,
|
settings = this.settings,
|
||||||
extension = settings.defualtExtension;
|
extension = settings.defaultExtension;
|
||||||
|
|
||||||
if (typeof settings.setupFormData === 'function') {
|
if (typeof settings.setupFormData === 'function') {
|
||||||
settings.setupFormData(formData, file);
|
settings.setupFormData(formData, file);
|
||||||
|
@ -370,8 +370,11 @@
|
||||||
if (this.isFileAllowed(item)) {
|
if (this.isFileAllowed(item)) {
|
||||||
result = true;
|
result = true;
|
||||||
var id = ID();
|
var id = ID();
|
||||||
this.onFileInserted(item.getAsFile(), id);
|
var file = item.getAsFile();
|
||||||
this.uploadFile(item.getAsFile(), id);
|
if (file !== null) {
|
||||||
|
this.onFileInserted(file, id);
|
||||||
|
this.uploadFile(file, id);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue