Help ! Stuck on sending files (privacy rules)

Dear all,

I’m stuck on something and after 3 days of seeking, i’m gonna be crazy :sweat_smile:

Here the problem :

I have a thing on which the user insert multi files, attached to the thing:
image

When i try to passe one (or many files) on base64, the file is corrupted and saying that :

When the file is not “private”, there is no problem:
image

The action is performed on a backend workflow, with or without authentification have no impact…

Anyone have an idea ?

Thanks a lot

Check your privacy rules.

If you are using this data in back-end workflow, you can check “ignore privacy rules”

1 Like

Hello Akur1,

Thanks for your feedback.

I check the rules on the WF and it’s already set like that :

image

This has no impact on the file.

However, when everyone can consult attached files it work but i dont want to let the file open on the web.

image

Another option, if you want to keep privacy rules, but need to reach the file url, you can add ?api_token=youradminapikey to the url

Thanks Jici for your feedback.

My main goal is yo send a mail through Sendgrid.

Looking the logs, i know the problem is not comming from the plugin but from Bubble when i look the logs

If you send it in base64, get the file using the api_token like I told you

Jici,

I search 3 files on a object, i transcod them on Base64 and then send data to sendgrid.

I don’t understand

I was thinking you was using a plugin to convert file into base64.
This sound strange that it doesn’t work if you follow privacy rules.
But it may be related to this topic:

Jici,

However, you helped me a lot !

With a plugin i download the file already uploaded (private), like a temporary file i use it and then i delet it.

image

Step 3 : i download the initial file which is private (i retrieve it with the ?api_token=youradminapikey) in order to create a new one (like a tempory file), which is not private.
Step 4 : i use the result of step 3 in base64
Sept 5 : i delet the temporary file

Not the best way but this workaround work well

2 Likes

Bug finded:

image

Bubble is not considering the “Ignore privacy rules”:
image

Hi @d.pimentel

Just a shot in the dark :slightly_smiling_face:
I had this kind of problem in the past somebody from forum (maybe @Jici he is an expert) helped me to overcome this by checking the box “Ignore the privacy rules” on the API workflow in the workflow tab on the front…

Screenshot 2022-09-01 at 18.08.25

2 Likes

Edit: i find the problem

The Ignore privacy rules should be used in the backend AND frontend action, otherwise the option not apply

image

1 Like

Hello !

I find it to just know !

A big thanks :-))))))))))))

2 Likes

I spoke to quickly… It’s not working…

Content files are not accessible when files are set to private…

File result:
image

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