-1

I am trying browser uploads to my s3 bucket using POST form. this is my form:

enter image description here

the variables ("X-Amz-Algorithm","X-Amz-Credential","X-Amz-Date","X-Amz-Expires","X-Amz-SignedHeaders","X-Amz-Security-Token","X-Amz-Signature") are dynamically initialized by a javascript function parsing searchparams once the "presignedurl" is obtained by api gatewaybut when i submit form i obtain the error:

<Code>InvalidArgument</Code> <Message>Malformed Unicode code sequence in the field.</Message> <ArgumentName>formField</ArgumentName>

if i use the same presignedUrl in postman it works fine.

I don't know how to fix it. Every example I have gone through is using similar process. Thanks in advance.

1 Answers1

0

I fixed it with a javascript function and adding this " "AllowedOrigins": ["*"]" to the CORS configuration. So I do the "submit" from the javascript function