Saving Private Files to S3 with Privacy Rules

Hey everyone,

I’m running into a bit of a snag and could use some help. I’m trying to save a private file to S3, but I keep getting this error:

Unexpected status code 401 while getting content to save to S3 from URL https://myapp/version-test/fileupload/string_here/test.png

The thing is, the whole process works perfectly fine when it’s not a private file. I’ve made sure my privacy rules are set so I can see view attached files, but it still doesn’t work.

My use case is that I need the file saved to S3 so I can use OpenAI’s vision API. Has anyone here figured out how to do this or run into the same issue? If you have, what did you do to fix it?

I’ve looked around and couldn’t find much info on this. Any tips or advice would be really appreciated!

If your file is private and you are trying to send it to external service, you may need to append api key to file url. You can find a few topics about that on the forum
?api_token=bubbleapikey

Another solution is to first save the file as public, send it to third party, create a private version of the file and delete the file once processed. You can use this plugin to save the private file File Uploader Bubble API Plugin | Bubble

This topic was automatically closed after 70 days. New replies are no longer allowed.