I have the typical form to register a record (VUE.JS).
One of its fields is an 'input type = file'.
I am able to upload a file, send it to the server (Java), and register it in the database (mongo) along with the rest of the fields.
The user can return to this same page, but in edit mode. (Do some changes and save it again..)
And this is where I have the problem: I am able to load the input file with the name of the file that I retrieve from the database (“fileName”). BUT not the binary data itself of the file (“fileData”).
The ‘data’ related to the file is available at this point in the frontend as this JSON object:
{
"fileName" : "DocPrueba (1).PDF",
"fileData" : "JVBERi0xLjcNCiW1tbW1DQoxIDAgb2JqDQo8PC9UeXBlL0N …. Omited lots of chars like this…."
}