Re: Mulitpart form posts and mysql blobs

From: Date: Sat, 15 Nov 2003 01:51:21 +0000
Subject: Re: Mulitpart form posts and mysql blobs
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-169719@lists.php.net to get a copy of this message
Hi, Haven't really done much work with blobs ( i always prefer to save just the file name in the databse) obviously this is a scenario where that approach is advantages. multipart/form-data isn't a very complex encoding scheme. Essentially what it does is combine all the files and other form fields together into a singe multipart message. Each file or data item has it's own headers. I recommend that you take a quick look at RFC 1867 and RFC 2616 If your server has perl you can very easily create a form handler that reads in from STDIN and writes to a file to see first hand what the multipart/form-data looks like. If you want i can give you such a script. John Ryan wrote:
How are files encoded when theyre sent in mulitpart forms??? Is it the same as blob fields in mySQL databased when you use the LOAD_FILE() command?? If not, is it easy to convert from one to the other?? At the moment, Im taking the blob from mySQL and writing it to a file and then uploading that file through cURL! Very messy. TIA
-- Raditha Dissanayake. ------------------------------------------------------------------------ http://www.radinks.com/sftp/ | http://www.raditha.com/megaupload Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader Graphical User Inteface. Just 150 KB | with progress bar.

« previous php.general (#169719) next »