amplify-js: While in the mock mode, I cannot upload a file. The `PUT` request is sent to the `https` endpoint instead of the `http`
Describe the bug
While in the mock mode, I cannot upload a file. The PUT request is sent to the https endpoint instead of the http
Amplify CLI Version
4.13.4
To Reproduce
amplify add authamplify add storageamplify mock- observe message in terminal
Mock Storage endpoint is running at http://localhost:20005 - try to upload a file
- go to Chrome’s console
- observe error message
PUT https://localhost:20005/my-bucket-name/public/my-file.png?x-id=PutObject net::ERR_SSL_PROTOCOL_ERROR
Expected behavior
to be able to upload a file and see it in amplify/mock-data/S3/my-bucket directory
Desktop (please complete the following information):
- OS: macOS
- Node Version: v10.13.0
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 2
- Comments: 26 (7 by maintainers)
Hi please try with the latest version of amplify (try removing the node_modules and lock files if required.) There is currently another bug with Storage.Put which we are working on priority right now #5876
Also getting this issue, CLI version 4.20.0,
@aws-amplify/storage@3.1.9,aws-amplify@3.0.10,aws-sdk@2.675.0. Maybe themockcommand should self-sign some certs and then the whole environment could run overhttps://? Would bring it closer to a production environment.@sakhmedbayev What’s the aws-amplify lib version you’re using on your client?