Open sanjiv221 opened 1 year ago
const client = filestack.init("Your API Key"); await client.upload("/tmp/"+filename, {}, { filename: filename }, {}).then(data => {console.log(data)})
console.log output: File { _file: { name: 'Test.pdf', size: 12668, type: 'application/pdf', slice: [Function: slice] }, _sanitizeOptions: undefined, status: 'Stored', handle: 'some value', url: 'https://cdn.filestackcontent.com/{some value}', container: undefined, key: undefined, <---- is undefined uploadTags: undefined, workflows: undefined }
I ran into a similar issue with the picker and found that I had not configured the store options correctly. I added the following store options and the key was populated
storeTo: { location: 's3', }
console.log output: File { _file: { name: 'Test.pdf', size: 12668, type: 'application/pdf', slice: [Function: slice] }, _sanitizeOptions: undefined, status: 'Stored', handle: 'some value', url: 'https://cdn.filestackcontent.com/{some value}', container: undefined, key: undefined, <---- is undefined uploadTags: undefined, workflows: undefined }