Skip to content

Commit

Permalink
uploadFile returns the full response
Browse files Browse the repository at this point in the history
  • Loading branch information
daneryl committed Mar 5, 2021
1 parent d87b298 commit aa2f46b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/shared/JSONRequest.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ export default {

delete: (url, data, headers) => _fetch(url, data, 'DELETE', headers),

// TEST!!! Fully untested function
// TEST!!!! Fully untested function
uploadFile: (url, filename, file) =>
new Promise((resolve, reject) => {
superagent
Expand All @@ -127,7 +127,7 @@ export default {
.set('Cookie', cookie || '')
.attach('file', file, filename)
.then(response => {
resolve(response.body);
resolve(response);
})
.catch(err => {
reject(err);
Expand Down

0 comments on commit aa2f46b

Please sign in to comment.