ilhamdev commited on
Commit
d5fe32f
·
verified ·
1 Parent(s): 33823b6

Update index.js

Browse files
Files changed (1) hide show
  1. index.js +1 -2
index.js CHANGED
@@ -503,11 +503,10 @@ app.all('/', (req, res) => {
503
  const file = File.fromURL(url);
504
  await file.loadAttributes();
505
  let data = await file.downloadBuffer();
506
- data = await uploadBuffer(data)
507
  return res.json({
508
  title: file.name,
509
  size: formatSize(file.size),
510
- url: data
511
  })
512
  } catch (e) {
513
  console.log(e);
 
503
  const file = File.fromURL(url);
504
  await file.loadAttributes();
505
  let data = await file.downloadBuffer();
 
506
  return res.json({
507
  title: file.name,
508
  size: formatSize(file.size),
509
+ url: data.toString('base64')
510
  })
511
  } catch (e) {
512
  console.log(e);