[wp-hackers] file upload: why actual files?
Chris Coggburn
Chris at Coggburn.us
Sun Sep 19 03:57:52 UTC 2004
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.
Multiblog users might like the idea because it would allow users to
upload files and have them just be stored in the database.
--
Christopher Coggburn
Chris at Coggburn.us
http://chris.coggburn.us
http://beyonddigital.net
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 256 bytes
Desc: OpenPGP digital signature
Url : /pipermail/hackers_wordpress.org/attachments/20040918/c3410674/signature.bin
More information about the hackers
mailing list