Templates Plugins Courses

Need help with AWS File Uploader

can somebody let me know, what could’ve gone wrong if this message pops up?

Hello, @sunnymalhi17
Thanks for reporting your issue.

If you carefully followed the documentation for the plugin and this issue appeared, the reason is the wrong JSON settings. Please copy and paste the following codes into their respective blocks:

Bucket policy

{

    "Version": "2012-10-17",

    "Statement": [

    {

    "Sid": "AddPerm",

    "Effect": "Allow",

    "Principal": "*",

    "Action": "s3:GetObject",

    "Resource": "YOUR_ARN_HERE/*",

    "Condition": {

    "StringLike": {

    "aws:Referer": "YOUR_DOMAIN_HERE/*"

    }

    }

    },

    {

    "Sid": "AddPerm2",

    "Effect": "Allow",

    "Principal": "*",

    "Action": "*",

    "Resource": "YOUR_ARN_HERE/*"

    }

    ]

    }

ACL
image

CORS

[

{

"AllowedHeaders": [

"*"

],

"AllowedMethods": [

"GET",

"PUT",

"DELETE",

"POST"

],

"AllowedOrigins": [

"YOUR_DOMAIN_HERE"

],

"ExposeHeaders": [

"ETag"

],

"MaxAgeSeconds": 30000

}

]

Save the setups, then give it a try again, please. In case the issue will persist - let me know :pray:
Best regards,

Hello, great help, it works just one minor thing, won’t let me delete files from my bucket. I mean when im deleting the file from my website, it won’t delete on the bucket.

Hello, @sunnymalhi17
Thanks for this question :slightly_smiling_face:

In case the files are deleted only from your application, but not from the S3 bucket, this action is configured not correctly.
Firstly, allow me to advise you to check this part of the documentation: https://docs.zeroqode.com/plugins/aws-file-uploader-plugin#plugin-actions

Also, please find below the screenshots of our Demo settings for the mentioned action:




Please try these settings and let me know if the issue was fixed.
Best regards,

Hello, the uploading was working fine for sometime, now its showing the same error, “Server responded with 0 code”

Hello, @sunnymalhi17
Sorry to hear about your error.

If you carefully followed the documentation for the plugin and this issue appeared, the reason is the wrong JSON settings. Please copy and paste the following codes into their respective blocks:

Bucket policy

{

    "Version": "2012-10-17",

    "Statement": [

    {

    "Sid": "AddPerm",

    "Effect": "Allow",

    "Principal": "*",

    "Action": "s3:GetObject",

    "Resource": "YOUR_ARN_HERE/*",

    "Condition": {

    "StringLike": {

    "aws:Referer": "YOUR_DOMAIN_HERE/*"

    }

    }

    },

    {

    "Sid": "AddPerm2",

    "Effect": "Allow",

    "Principal": "*",

    "Action": "*",

    "Resource": "YOUR_ARN_HERE/*"

    }

    ]

    }

ACL
image

CORS


[

{

"AllowedHeaders": [

"*"

],

"AllowedMethods": [

"GET",

"PUT",

"DELETE",

"POST"

],

"AllowedOrigins": [

"YOUR_DOMAIN_HERE"

],

"ExposeHeaders": [

"ETag"

],

"MaxAgeSeconds": 30000

}

]

Save the setups, then give it a try again, please.
Best regards,

Hello, I tried this too, same thing same issue showing.

Hello, @sunnymalhi17
Sorry to hear that :pray:

In case the issue still persists, the probable reason is the сonfiguration of your S3 Bucket.
I highly recommend you to double-check this section in our documentation:

Please carefully check all the settings and especially, AWS Cognito Identity settings:

Looking to hearing from you soon.
Best regards,