Saving files to SQL

I would like to upload and save files to SQL.
Once it’s in, how would I go about retrieving the data and presenting it to the user again?
Has anyone done this before?

1 Like

Use the plugin SQL Database Connector and make the SQL queries.

Ualdir kindly demonstrate how you write file data using the standard sql connector.

Just create a statement “insert” and select the type of data “file”.

Have you actually managed this and if so what db are you running. Running mssql I get fed a varchar not varbinary.

I have never test to insert file I’m using MySQL. However looks like the same solution at the API connection with Dropbox that I have done and probably you have to pass a link as the parameter.

I’m trying to upload to db directly from host so passing a link is out of the question. Ie. Having an upload that opens a sql connection, covers data to binary and uploads directly. Conversely I need a tool to extract and recompile the file data. Seems to me normal sql query is only a piece of the puzzle. You still need a converter for the disassembly / assembly part. Well that is my simpleton opinion. If anyone has actually managed to do this I’d love to see an example.