diff --git a/dist/public/js/app.js b/dist/public/js/app.js index 6ebc7cb..2e4ba48 100644 --- a/dist/public/js/app.js +++ b/dist/public/js/app.js @@ -31891,8 +31891,7 @@ function Media(props) { file = files[0] || {}; start = new Date(); _context2.next = 5; - return api_media.UPLOAD('upload/attachment', file, { - chat_uuid: '1234567890', + return api_media.UPLOAD('file', file, { name: file.name || 'filename', description: description || 'description', ttl: ttl @@ -31902,14 +31901,15 @@ function Media(props) { r = _context2.sent; end = new Date(); time = end.getTime() - start.getTime(); - console.log('Upload Timer: finished in', time, 'ms'); // await api.relay.POST('attachment', { + console.log('Upload Timer: finished in', time, 'ms'); + console.log(r); // await api.relay.POST('attachment', { // muid: r.muid, // file_name: r.filename, // chat_id: 13, // ttl: ttl, // }) - case 9: + case 10: case "end": return _context2.stop(); } diff --git a/frontend/components/Media/index.jsx b/frontend/components/Media/index.jsx index 364d953..cb199f9 100644 --- a/frontend/components/Media/index.jsx +++ b/frontend/components/Media/index.jsx @@ -43,8 +43,7 @@ export default function Media(props) { const ttl = 60*60*24*7 // one week const file = files[0] || {} var start = new Date(); - const r = await api.media.UPLOAD('upload/attachment',file,{ - chat_uuid: '1234567890', + const r = await api.media.UPLOAD('public',file,{ name: file.name||'filename', description: description||'description', ttl: ttl, @@ -52,6 +51,7 @@ export default function Media(props) { var end = new Date(); var time = end.getTime() - start.getTime(); console.log('Upload Timer: finished in', time, 'ms'); + console.log(r) // await api.relay.POST('attachment', { // muid: r.muid, // file_name: r.filename, diff --git a/public/js/app.js b/public/js/app.js index 6ebc7cb..2e4ba48 100644 --- a/public/js/app.js +++ b/public/js/app.js @@ -31891,8 +31891,7 @@ function Media(props) { file = files[0] || {}; start = new Date(); _context2.next = 5; - return api_media.UPLOAD('upload/attachment', file, { - chat_uuid: '1234567890', + return api_media.UPLOAD('file', file, { name: file.name || 'filename', description: description || 'description', ttl: ttl @@ -31902,14 +31901,15 @@ function Media(props) { r = _context2.sent; end = new Date(); time = end.getTime() - start.getTime(); - console.log('Upload Timer: finished in', time, 'ms'); // await api.relay.POST('attachment', { + console.log('Upload Timer: finished in', time, 'ms'); + console.log(r); // await api.relay.POST('attachment', { // muid: r.muid, // file_name: r.filename, // chat_id: 13, // ttl: ttl, // }) - case 9: + case 10: case "end": return _context2.stop(); }