Accessing an image within a railway. app PGS database

Hi all, Absolutely love Railway.app but just wondering if anyone can assist with accessing an image which is saved in the DB via a FormBricks submission. In summary I want to access those images in an N8N workflow also hosted on Railway. App Much thanks
Solution:
okay so i spent a good while on a formbricks template with minio and got 99% of the way finished, until i tested uploading and found out the backend returns the wrong url for the signed s3 file uploads, i then spent another good while trying to debug that and combing through formbrick's code to no avail. The solution im now proposing is, use the REST api formbricks provides - https://documenter.getpostman.com/view/11026000/2sA3Bq5XEh#f7e77579-edfd-4416-b266-6af2ce04dfdf that simple request gives you a json response for all form responses and in that it contains direct links to the uploads that are served from the volume via formbricks....
Jump to solution
18 Replies
Percy
Percy7mo ago
Project ID: N/A
juanmackie🇦🇺
juanmackie🇦🇺OP7mo ago
N/aa
Brody
Brody7mo ago
you can't access the disk storage of one service from another service, formbricks would need to provide an n8n integration or API for this, or you would need to have formbricks store the images in a place thats accessable by multiple services like MinIO s3
juanmackie🇦🇺
juanmackie🇦🇺OP7mo ago
Noted with thanks...... I was hopefully just going to use the URL that points to the blob within postgress, but I will look to implement your advice.
Brody
Brody7mo ago
i dont think formbricks stores images in postgres
juanmackie🇦🇺
juanmackie🇦🇺OP7mo ago
I might be misunderstanding, as I have NIL experience with postgress it is most likely the case. Appreciate the prompt response and help/nudge in the right direction
Brody
Brody7mo ago
happy to help where i can
juanmackie🇦🇺
juanmackie🇦🇺OP7mo ago
Hey @Brody , Thanks again the leads this morning. Are you able to briefly point me in the write direction on how to go about using minio . I have set up minio in the same project space on railway I have added the variables to the formbricks variables tab in railway.app As an alternative solution,I have tried using N8N and the S3 node to save the file but I get an error stating "hostname/ip does not match certificate's altnames" I have googled and quizzed the hell out of it but just can't make either of the approaches work. Oh I also tried maybe using a webhook from FormBricks to minIO Thanks in advance
Brody
Brody7mo ago
so basically you just want to be able to access any media uploaded to formbricks from multiple services?
juanmackie🇦🇺
juanmackie🇦🇺OP7mo ago
Pretty much yes. Using minIO, as you mentioned the uploaded media would be accessable via the minIO URL for said media item . Based on that I can use the minIO item URL in my workflow and just set a variable to access each item via my N8N workflow.
Brody
Brody7mo ago
switching to minio would likely mean loosing access to any images previously saved to the volume, are you aware and okay with that?
juanmackie🇦🇺
juanmackie🇦🇺OP7mo ago
Totally fine 👍
Brody
Brody7mo ago
alright, then I will try my hand at a formbricks with minio
juanmackie🇦🇺
juanmackie🇦🇺OP7mo ago
🙏🙏 big thanks
Solution
Brody
Brody7mo ago
okay so i spent a good while on a formbricks template with minio and got 99% of the way finished, until i tested uploading and found out the backend returns the wrong url for the signed s3 file uploads, i then spent another good while trying to debug that and combing through formbrick's code to no avail. The solution im now proposing is, use the REST api formbricks provides - https://documenter.getpostman.com/view/11026000/2sA3Bq5XEh#f7e77579-edfd-4416-b266-6af2ce04dfdf that simple request gives you a json response for all form responses and in that it contains direct links to the uploads that are served from the volume via formbricks.
juanmackie🇦🇺
juanmackie🇦🇺OP7mo ago
Wow your level of willingness to help is amazing 😍. Thank you , thank you thank you
Brody
Brody7mo ago
thanks for the kind words
juanmackie🇦🇺
juanmackie🇦🇺OP7mo ago
You're welcome
Want results from more Discord servers?
Add your server