Skip to content

Commit

Permalink
Merge pull request #15 from veneliniliev/master
Browse files Browse the repository at this point in the history
upload field name with translations
  • Loading branch information
ablunier authored Nov 12, 2020
2 parents 27a529e + 5b09c4e commit 012696f
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 012696f

Please sign in to comment.