diff options
Diffstat (limited to 'app/client/api/index.js')
| -rw-r--r-- | app/client/api/index.js | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/app/client/api/index.js b/app/client/api/index.js index 2603b38..857cdc7 100644 --- a/app/client/api/index.js +++ b/app/client/api/index.js @@ -4,17 +4,16 @@ import fetch from 'node-fetch' import { crud_fetch, postBody } from './crud.fetch' export const folder = crud_fetch('folder') - -folder.upload = (folder_id, files) => { - var data = new FormData() - for (var i = 0; i < files.length; i++) { - data.append('file', files[i]) - } - return fetch('/api/folders/' + folder_id, postBody(data)) - .then(req => req.json()) - .catch(error) -} - export const file = crud_fetch('file') export const task = crud_fetch('dataset') export const task = crud_fetch('task') + +// folder.upload = (folder_id, files) => { +// var data = new FormData() +// for (var i = 0; i < files.length; i++) { +// data.append('file', files[i]) +// } +// return fetch('/api/folders/' + folder_id, postBody(data)) +// .then(req => req.json()) +// .catch(error) +// } |
