Skip to content

Commit

Permalink
Media (Page): Do not extend parent metehod for sending files since Sa…
Browse files Browse the repository at this point in the history
…fari and IE APIs for FormData don’t implement `delete` (fixes #772)
  • Loading branch information
w00fz committed Sep 15, 2016
1 parent 8e483f1 commit 0512a7f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -3,6 +3,7 @@

1. [](#bugfix)
* Fix [#1034](https://github.com/getgrav/grav/issues/1034) redirect of page creation procedure when system.home.hide_in_urls is enabled
* Media (Page): Do not extend parent metehod for sending files since Safari and IE API for FormData don’t implement `delete` ([#772](https://github.com/getgrav/grav-plugin-admin/issues/772))

# v1.2.2
## 09/08/2016
Expand Down
6 changes: 6 additions & 0 deletions themes/grav/app/pages/page/media.js
Expand Up @@ -65,8 +65,14 @@ export default class PageMedia extends FilesField {
}

onDropzoneSending(file, xhr, formData) {
/*
// Cannot call super because Safari and IE API don't implement `delete`
super.onDropzoneSending(file, xhr, formData);
formData.delete('task');
*/

formData.append('name', this.options.dotNotation);
formData.append('admin-nonce', config.admin_nonce);
}

onDropzoneComplete(file) {
Expand Down

0 comments on commit 0512a7f

Please sign in to comment.