vue-dropzone
vue-dropzone copied to clipboard
Getting 403 Forbidden error when trying to upload video directly to amason s3 with chunks
I use vue-dropzone for uploading files directly to amazon s3. Everything is ok without chunking. Even uploaded large videos (400MB). But when I set chunking: true, I get 403 Forbidden error with this response.
<Code>AccessDenied</Code> <Message>Invalid according to Policy: Extra input fields: dzuuid</Message>
I have changed acl: public-read-write to acl: private, but it's not solved my problem.
@anidav Could you provide all requests params which are sent to AWS.?
This error occurs because we try to send the file in parts to S3.
The parameters sent are from the file block.
same issue
This is happening because you need to specify these as conditions in your POST policy (generated on the server).
For example, in Python:
response = s3.generate_presigned_post(
Bucket=bucket,
Key=key,
Fields={
"acl": "private",
"Content-Type": contentType,
},
Conditions=[
{"acl": "private"},
{"Content-Type": contentType},
["starts-with", "$success_action_status", ""],
["starts-with", "$dzuuid", ""],
["starts-with", "$dzchunkindex", ""],
["starts-with", "$dztotalfilesize", ""],
["starts-with", "$dzchunksize", ""],
["starts-with", "$dztotalchunkcount", ""],
["starts-with", "$dzchunkbyteoffset", ""],
],
ExpiresIn=one_hour,
)
Update: it appears that chunking is not supported, see: https://github.com/rowanwins/vue-dropzone/issues/544