Skip to content

Commit

Permalink
upload field name with translations
Browse files Browse the repository at this point in the history
  • Loading branch information
veneliniliev committed Aug 18, 2020
1 parent 1a2f045 commit 5b09c4e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion dist/js/field.js

Large diffs are not rendered by default.

6 changes: 4 additions & 2 deletions resources/js/ckeditor5/upload-adapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,12 @@ export default class NovaCKEditor5UploadAdapter {
data.append('attachment', file)
data.append('draftId', this.draftId)

const fieldName = this.field.attribute.split('.');

return Nova.request()
.post(`/nova-vendor/ckeditor5-classic/${this.resourceName}/upload/${this.field.attribute}`, data, {
.post(`/nova-vendor/ckeditor5-classic/${this.resourceName}/upload/${fieldName[0]}`, data, {
headers: {
'Content-Type': 'multipart/form-data'
'Content-Type': 'multipart/form-data'
}
})
.then(response => {
Expand Down

0 comments on commit 5b09c4e

Please sign in to comment.