Skip to content

Commit

Permalink
feat(upload-core): add file metadata via tus
Browse files Browse the repository at this point in the history
Add file name and file type to the tus meta data which gets handles special via the tus protocol.

Fixes #20
  • Loading branch information
TheSharpieOne authored Apr 3, 2018
1 parent 6ef4652 commit f8a4cf1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/upload-core/upload.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,10 @@ class Upload {
resume: true,
endpoint: `${this.options.endpoint}/${this.options.bucketId}/`,
chunkSize: this.options.chunkSize,
metadata: {
filename: file.name,
filetype: file.type,
},
headers: {
'X-XSRF-TOKEN': this.getToken(),
'X-Availity-Customer-ID': this.options.customerId,
Expand Down

0 comments on commit f8a4cf1

Please sign in to comment.