Access denied to S3 file

Hi there!

I followed all the steps to upload an image and have gotten a download URL successfully.

Problem is, once I open the download URL, it returns the page as shown in the image, indicating that access was denied.

Is there something else I should do not to have such access denied?

App ID is 179696

Thanks in advance.

1 Like

Hi! The download URL only works for 15mins from when you got it, so you have to refresh it every once in a while. This is done for security purposes.

1 Like

Hi, Mevi! Thanks for the reply

I actually tried accessing the urls immediately after uploading, so I’m guessing I might have made a mistake somewhere else along. I was aware of the 15 minute limit for the url.

Any other ideas on why this could happen?

Thanks again

Hi there! I tried going through the logic again and the debugger, and found that the upload is being doing just right and the download url is also being generated likewise.

I’m using it way before the 15 minute limit runs out, almost immediately, and it still gives me an “access denied” page from amazon s3.

Do you know any other reason this could be happening? My app ID is 179696

I read a few forum posts related to this, but couldn’t find anything helpful with this specific issue.

Thanks in advance.

1 Like

Hi! I don’t know if you made any changes but it looks to me like your “Choose file and upload” button works fine? The “Get file” button doesn’t work, but the id it has is hardcoded, so it can’t work.

Hi! Thanks for the reply!

I was using it only on the web preview, but now that I used it on mobile, it worked, just like yours.

Is it supposed to work as well on web or is this one of the features that just work on mobile?

Hmm I think there are some problems with pick image from gallery on web :thinking: I was able to verify your problem, but found a working case we have for web which uses the pick files flow function instead. You can try that in the meanwhile until pick image from gallery gets fixed!

1 Like

Alright. So on the appgyver app, I was only able to get the pick files flow function to work by removing the “mimeType” property on the get upload urls flow. For as long as it was there, it didn’t work. Don’t know why.

Still, on the web, I can’t get it to work. Could you send me screenshots of the working case you have, so I could see what I did wrong?

Thanks again!

Sure! This here is from a tester app, so the structure is a little odd for a normal use case, but you can combine these actions together.

Buttons in order:
Screenshot 2021-01-08 at 10.23.08

First button:


Here in Pick files filetype is allFiles, and the page variable is set simply with files from the output of pick files.

filesToUpload structure:

Second button:


Get bucket upload URLs uses filesToUpload. filesUpload is set to be the files from the output of get bucket upload URLs.

Page variable filesUpload structure:

Third button:


Upload files takes page variable filesUpload.

Fourth button:


Get bucket download URLs takes filesUpload.

Page variable filesDownload structure:

And image to display the first image in the downloaded files is configured like so:

Hi, Mevi! Thanks for the reply and sorry for taking long to answer. I just wanted to try your method a few times before replying.

To sum up,

  1. I could not get it to work on the Web Preview, having tried on Chrome, Safari, both on Mac and Windows. I created a new app just for this, with app ID 188180.
  2. It works on the mobile preview app, as long as I remove the mimeType property, as shown below. Don’t know why, but it only worked when I removed it.

If you could possibly take a look at the app with id 188180, I’d appreciate it very much.

Thanks again!

Quick suggestion. I think it would be very helpful if there was a way to share apps with the community, so users could duplicate them and build their own app on top of them. In this way, not only the AppGyver team could share sample apps, but the community as well.

Hmmm… Something weird is going on here, I’m looking into it and will let you know once I know more.

1 Like

Just to let you know, this uncovered a really weird issue in our file uploading backend which we’re looking to fix hopefully today or tomorrow, I’ll let you know once I know more. Thanks for the very thorough reporting that allowed me to discover this!

This should now be fixed!

Thank you for helping me out! I’m gonna go check the app right now and come back for feedback.

Yep! Seems to be working just fine. Thanks again for all the help! :grin:

1 Like

I have this same issue today.

I am aware that it seems to be fixed for some people but I get the Access Denied XML error message just like described above.

I’ accessing the file immediately after it has been uploaded.
In the debug output I do see the downloadUrl being added properly.
I’m testing it on my phone via the AppGyver iOS app.

Hmm… I tested the same case I presented above and didn’t receive the XML error, the image displayed like usual. What version of the preview are you using?

Hi Mevi, thanks for reading my post.
I guess you mean the “version of the iOS AppGyver app”? It’s 2.5.7.

My goal is to upload the image to my API (Backendless) which expects a URL to that file.

So I run the flow shown above, upload the files to S3, I do get the downloadUrl but that URL gives me the access denied error.

I do expect the downloadUrl to work once I have it - but it does not.

In the debug output above, you can see that my file contains the storeKey, uploadUrl and downloadUrls.

It would be cool to find out what the reason is.
I will do whatever you suggest @Mevi to fix it.

I will await your reply eagerly :slight_smile:

same problem…

Hi Mevi,
I also encountered this access denied problem while trying to run the obtained image download url. I tried to link this download url to the image source on appgyver app after the download link was obtained, but got the access denied error message. Do you have any suggestions for this? Thanks.