[wp-hackers] file upload: why actual files?
Michael Leuchtenburg
michael at slashhome.org
Sun Sep 19 16:17:57 UTC 2004
Chris Coggburn wrote:
> Michael Leuchtenburg wrote:
>
>> Is there a design reason for Wordpress to upload files to a directory,
>> rather than putting them in the database? It seems to me that it would
>> make more sense to put them in the database, possibly associated with
>> individual posts. This would remove the need to have that directory
>> writable by the user the webserver is running as, it would remove the
>> need to rename files, and it would reduce the number of places data
>> needed to backup/recreate a weblog can be in.
>>
>> I am thinking of implementing this. I would do it in a way that can
>> run alongside the current code, switched by an option in the admin
>> dialog.
>>
>> Any thoughts?
>>
>
> The reason why this isn't done is that it places quite a bit of load on
> the MySQL/Web server that isn't really necessary if it is just read with
> your webserver. However I do believe that it should be an option to be
> considered for WP1.3. Also using binary blobs presents a memory issue,
> MySQL doesn't handle binary data the well on earlier versions, requiring
> the entire chunk to be loaded into RAM before being sent to PHP and then
> the client requesting the data.
Do you know at what version it starts handling them well? I haven't been
able to figure it out, searching with google and on mysql.com.
> Multiblog users might like the idea because it would allow users to
> upload files and have them just be stored in the database.
Good point. This could be a definite advantage, from a hosting
perspective. Of course, there are still all the templates which present
a problem, but that may change as work continues on WP.
--
Michael Leuchtenburg | http://slashhome.org/
cell: 413.433.0739
More information about the hackers
mailing list