Closed tmathern closed 3 years ago
Hi @tmathern , let's ask @sandeep-paliwal and @moritzraho for more guidance.
Hi @tmathern , I guess the file is not present in the file storage for which the URLs are being generated. You will have to create the file using the write operation and then it can be shared using presign-URLs.
Just add following line before generating the URL and see if this works for you.
await files.write('./test/files/newton.dn', '<h1>Test file url issue</h1>')
Hi @tmathern ! Did @sandeep-paliwal 's answer help you solve your issue?
@meryllblanchet It helped. I'll close this.
Expected Behaviour
Presigned URLs generated by the aio-lib-files library should be usable directly in the browser as is. If I used the library in a wrong way (see below), would there be a way to support this usage? (Which comes near to https://github.com/adobe/aio-lib-files/issues/59).
Actual Behaviour
Presigned URLs generated by the aio-lib-files library cannot be used. For instance when trying with the browser, I get this error:
Reproduce Scenario (including but not limited to) & Sample Code that illustrates the problem
Run this piece of code. The generated URLs won't work:
If I used the library in a wrong way, would there be a way to support this usage, so I can use aio-lib-files for all my needs? (Which comes near to https://github.com/adobe/aio-lib-files/issues/59 also, I think).
Steps to Reproduce
Run the code from the previous point.
Platform and Version
Logs taken while reproducing problem
None.