I'm trying to use AWS Ampify and can't find a good reference. A guide, I can find, but not a reference. If I make a call to Storage.get, such as the code snippet below, and test.txt doesn't exist, what is returned?
Storage.get('test.txt')
.then(result => console.log(result))
.catch(err => console.log(err));
I'm finding that it returns a URL that results in a 404.
As of Amplify 0.4.7, the intended behaviour is to return a URL that results in a 404.
If you want to avoid the 404, you can check for the presence of the file using Storage.list(). Or you can attempt to pre-load the URL with some exception handling, before actually use it.
This seems like sub-optimal behaviour to me, especially with a framework like angular, so I've submitted a feature request.