Welcome to the SRP Forum! Please refer to the SRP Forum FAQ post if you have any questions regarding how the forum works.
Best ways to store binary data in OI
I am looking for tips and suggestions on the best way to store and serve binary data on a table..
I have a DOCUMENT table that stores metadata about attachments, while the PDF files themselves are stored on the file system.
Whenever our web-based frontend needs to retrieve a PDF, it makes an HTTP call to our OI backend. The backend performs an `OSBRead`, then uses `SRP_Encode` to Base64-encode the PDF, wraps the encoded data in JSON, and sends it back to the frontend.
I have noticed that with larger PDFs, the time required to read and encode the files becomes noticeable. I have experimented with increasing the number of bytes read by `OSBRead`, which has improved performance, but the overall process can still be slow.
Would it make sense to store the Base64-encoded PDF data directly in the `DOCUMENT` record instead?
Are there any concerns or limitations I should be aware of regarding record size, performance, or storing large amounts of encoded binary data directly in an OI record?
I have a DOCUMENT table that stores metadata about attachments, while the PDF files themselves are stored on the file system.
Whenever our web-based frontend needs to retrieve a PDF, it makes an HTTP call to our OI backend. The backend performs an `OSBRead`, then uses `SRP_Encode` to Base64-encode the PDF, wraps the encoded data in JSON, and sends it back to the frontend.
I have noticed that with larger PDFs, the time required to read and encode the files becomes noticeable. I have experimented with increasing the number of bytes read by `OSBRead`, which has improved performance, but the overall process can still be slow.
Would it make sense to store the Base64-encoded PDF data directly in the `DOCUMENT` record instead?
Are there any concerns or limitations I should be aware of regarding record size, performance, or storing large amounts of encoded binary data directly in an OI record?

Comments
But store as a seperate record, not in a field in case binary values create field markers (IMHO)
Maybe my problem is solved