Skip to main content

Add attachment on input.fileAsync

  • July 12, 2020
  • 1 reply
  • 15 views

I would like to prompt the user to upload a file which I would like to add to an attachment field on a record. From what I have read, the file must be uploaded first and I cannot do something like this:

let preview = await input.fileAsync(‘Please upload the new Audio Preview’);
await table.updateRecordAsync(record.id, {“Audio Preview”: preview});

I just wanted to make sure my understanding on this input.fileAsync is correct and how other people have handled this. Is there a way to upload the file and grab the url from where I uploaded it or is it better to just display the record and let the user upload it from the record. Thank you, I really appreciate all the help!

1 reply

Forum|alt.badge.img+19
  • Inspiring
  • 3263 replies
  • July 12, 2020

Here’s how I handle this case.