Skip to content

Commit

Permalink
fix track upload (#1314)
Browse files Browse the repository at this point in the history
use uploadBinary so form data is not mixed in to file
  • Loading branch information
mcfiredrill committed Mar 11, 2024
1 parent 2676cce commit 4430c02
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/components/track-uploader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,11 @@ export default class TrackUploader extends Component<TrackUploaderArgs> {
.then((response) => response.json())
.then((data) => {
track.set('audioFileName', data.endpoint.split('?')[0]);
return file.upload(data.endpoint, { method: 'PUT', headers: headers });
return file.uploadBinary(data.endpoint, { method: 'PUT', headers: headers });
})
.then((response) => {
console.log(`uploaded: ${response}`);
console.log(response);
track.set('isUploading', false);
if(typeof this.args.onFinishUpload == 'function') {
this.args.onFinishUpload();
Expand Down

0 comments on commit 4430c02

Please sign in to comment.