Hello,
I am faced with the problem of temporarily saving a file in a popup while filling out a order form and then only writing it away when the save button is pressed using an SQL query along with the entered order data. The process is as follows:
The "add_Order" popup serves the following purposes:
- All text fields in the popup must be filled in.
- A PDF that belongs to the order has been successfully uploaded.
- The desired date has been selected.
- If everything is OK, the order data is saved on the SQL server by pressing the save button.
My current procedure is:
- Check whether all fields have been filled in
- When the document is uploaded, the PDF is converted into a string using "onFileReceived" and "event.file.getString()" and passed to the "UploadByteCodeDrawingNumberFile" parameter of the "add_Order" popup.
- If the desired date is selected, the save button becomes active.
- If the save button is pressed, the named query is called, the string is converted into a byte array with "byte_data = UploadByteCodeDrawingNumberFile.encode("utf-8")" and then the SQL query is executed with the aim of making the uploaded file later available for download from the SQL server.
Unfortunately, this approach does not work...
Do you have any idea how I can temporarily save the file as a string, array or whatever in the form of a parameter after uploading it and then save the file as a byte array or varbinary when the SQL query is actually executed?
Many thanks in advance!