PHP] Re: Store uploaded files in MySQL-BLOB

From: Date: Tue, 10 Jul 2001 10:44:57 +0000
Subject: PHP] Re: Store uploaded files in MySQL-BLOB
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-57127@lists.php.net to get a copy of this message
----- Original Message ----- From: "Adam" <adam@wangallery.com> To: <php-general@lists.php.net> Sent: Tuesday, July 10, 2001 12:20 PM Subject: [PHP] Re: Store uploaded files in MySQL-BLOB > I would suggest setting the database column to LONGTEXT instead of BLOB > since it can accomidate far more characters per entry. > > As for the entry to the database through php, I'm not entirely sure what > method you're using to add these. Are they uploading their file and then it > reads it as it exists on the server? Is it supposed to read a file they > specify with a browse but never actually upload it anywhere? It might be > better to just include a text field for them to cut+paste to in a form if > it's nothing but text. > > -Adam The project is a kind of knowledge base. For each entry a user creates, he should be able to give additional information, such as every kind of file (i.e. not only code files but also images etc). There is an <input type="file" ...> where he selects the file to be uploaded. The php-script is simply supposed to receive the file and put it into the proper database-column (which is a MEDIUMBLOB by the way, should be enough space, or what's your opinion?). Tom

« previous php.general (#57127) next »