For some time have been looking for a solution on how to upload a file into BLOB with RTC Client. The built in functions, UPLOAD and UPLOADINTOSTREAM both force an Open Dialog unless you first copy the file to a temporary path. I already had the file name and wanted to skip that part.
I always stopped on the fact that I was unable to move binary data with code from the client layer to the server layer. Then today, I finally got an idea on how to solve this. I convert the client file to a base64 string, transfer that string to the server layer and save as a file. Then I create a binary server file based on the base64 server file. That file is identical to the client file and ready to be imported into BLOB on the server side.
[code htmlscript=”false”]IF ISSERVICETIER THEN BEGIN
ServerBase64FileName := ThreeTireMgt.ServerTempFileName(”,”);
ServerDocumentFileName := ThreeTireMgt.ServerTempFileName(”,”);
END ELSE BEGIN
This should support files upto 1.5GB in size.