0

how do i upload a file link like on my computer or device using file stack api?

[uuid=15482A77BB814FE5] Invalid URL file file:///C:/Users/dennis/Downloads/00/26038020_10215387798356617_1605819028_o.jpg - invalid schema 

it returns always like this but when i tried a http protocol it works fine.

also when i use pick() function its working properly but i dont what that function because it has a popup modal, can anybody help me with is this thank you.

dennis ayson
  • 171
  • 1
  • 1
  • 5

1 Answers1

2

The storeURL function is for web URLs only. If you want to upload a local file, use the upload() function:

const client = filestack.init('Your_API_Key');
client.upload(file, uploadOptions, storeOptions, token);

As per the documentation on Filestack's website: "The first parameter to upload must be a valid File, Blob, or base64 encoded string."

Relevant docs: https://www.filestack.com/docs/javascript-api/upload-v3

Richard Herbert
  • 133
  • 1
  • 2
  • 8