Browse Source

frontend test

feature/dockerfile-arm
Evan Feenstra 4 years ago
parent
commit
f8213d0bbf
  1. 8
      dist/public/js/app.js
  2. 4
      frontend/components/Media/index.jsx
  3. 8
      public/js/app.js

8
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();
}

4
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,

8
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();
}

Loading…
Cancel
Save