· 7 years ago · Apr 18, 2018, 01:04 PM
1var configs = {
2 bucket: 'web.document.images',
3 region: 'ap-south-1',
4 keyStart: 'image',
5 acl: 'public-read',
6 accessKey: "MyAWSaccessKey",
7 secretKey: "AWSsecretkey",
8 }
9var s3Hash = FroalaEditor.S3.getHash(configs);
10res.send(s3Hash);
11
12<?xml version="1.0" encoding="UTF-8"?>
13<CORSConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
14 <CORSRule>
15 <AllowedOrigin>http://localhost:3000</AllowedOrigin>
16 <AllowedMethod>GET</AllowedMethod>
17 <AllowedMethod>POST</AllowedMethod>
18 <AllowedMethod>PUT</AllowedMethod>
19 <MaxAgeSeconds>3000</MaxAgeSeconds>
20 <AllowedHeader>*</AllowedHeader>
21 </CORSRule>
22</CORSConfiguration>
23
24POST https://s3-ap-south-1.amazonaws.com/web.document.images 400 (Bad Request)
25
26<Error>
27<Code>
28InvalidArgument
29</Code>
30<Message>
31Malformed Unicode code sequence in the field.
32</Message>
33<ArgumentName>
34formField
35</ArgumentName>
36<RequestId>
37B0525397B7A4F4BC
38</RequestId>
39<HostId> XixTwvJmFCNPaKNpkdquQ5/wAzacTC8LPpApEb7XAySQ4pL3AFM2V6XeacGpAZcAP5gepD3myMo=
40</HostId>
41</Error>