Technically, it is realizable.
The first path, "beautiful"
Take C / C ++ / Pascal and write a plug-in to the server - UDF (user defined function), which you should transfer to the BLOB request with data, and she will write it where necessary. Moreover, there is even a piece of the source code.
Pros - from the frontend, everything is done by one request to the database server, no crutches are needed.
Cons - adorable, you need to know the terrible system programming languages.
The second path, "admin"
Pop the data into a temporary table (in BLOB type fields). After that, according to the schedule on the server, they will chase the script, which will gut this table and transfer the BOLOBs to the files
Pros - as in the first method, and also: it is not necessary to write anything special, the built-in tool isql can transfer the blob to a file, you just need to configure everything.
Cons - delay before files appear