Binary file upload to / download from PostgreSQL database

0
Hello, Purpose: I want to implement a page with binary file upload / download function in mendix. supplement: -Connect to PostgreSQL as an external database. -Create a table with bytea type columns and save the file there. -The file to be uploaded is PDF, etc., and the size is less than 1GB. Based on the above assumptions, I would like information if there is a track record of linking with PostgreSQL. What kind of microflow or individual logic do I need to create roughly? [Upload] DB connection establishment → File size check → Conversion →… Also, is such a method desirable for mendix? I've read the documentation below, but I don't know the constraints, so I'd like to avoid keeping it as an entity on mendix and keep it in PostgrSQL. Please point out any missing information. Documents I have already read: https://docs.mendix.com/howto/data-models/working-with-images-and-files https://community.mendix.com/link/questions/106576
asked
3 answers
0

Are the requirement just, “I want to implement a page with binary file upload / download function in Mendix” ? 

How important are your other requirements? Are they just there as a possible solution, or a specific fixed requirement?

When you upload a document to Mendix, behind the scenes it will create a record in the database which Postgres by default if you host on the Mendix Cloud. These are based on the FileDocument entity. The contents of the file are stored in the file system however. When you access a FileDocument in a Mendix application, Mendix is able to store and retrieve the contents of the file for you automatically. 

Hope this helps.

answered
0

Are the requirement just, “I want to implement a page with binary file upload / download function in Mendix” ? 

How important are your other requirements? Are they just there as a possible solution, or a specific fixed requirement?

When you upload a document to Mendix, behind the scenes it will create a record in the database which Postgres by default if you host on the Mendix Cloud. These are based on the FileDocument entity. The contents of the file are stored in the file system however. When you access a FileDocument in a Mendix application, Mendix is able to store and retrieve the contents of the file for you automatically. 

Hope this helps.

answered
0

I reaffirmed that the requirements and my perception were ambiguous.

First, we don't host on the mendix cloud.
Prepare a separate application server and change the main database from the built-in one to PostgreSQL.
* Since I first used the term external database here, it became difficult to understand. I'm sorry.

Therefore, the next thing to check is whether the FileDocument part shown will work the same even if it is replaced with PostgreSQL, or if any other special implementation will occur.
I first try running this in my local environment to see it. If you have any questions, I will come back again.

Thank you for your answers and questions.

answered