This content has been marked as final. Show 4 replies
No experience, but I know, theoretically, it can be done. You are
looking at what is generically called a BLOB [Binary Large OBject]
field. What the exact data type of such a field is will very from
database to database.
Then you will want to familiarize yourself with the ToBase64(),
ToBinary(), BinaryDecode(), BinaryEncode() and related functions as well
as the <cfcontent...> tag. These are CFML's methods to handle and
deliver alternate content such as binary files to and from clients.
Depending on the size of the audio files your DB is going to get pretty large (Not that it should stop you). Why are you averse to storing the pointer in the database and the file in a directory?
You should have a blob type column (In oracle) to save the content ..
First upload the file to webserver
Convert the same to binary
action = "readbinary"
file = "C:\temp\#cffile.serverFile#"
insert into files (FILE_ID,file_content)
delete the file from the server
That looks pretty much straight forward. Thank you!
I do realize about the size issue but was just looking into this technique as another option for storing files.