[development] files owned by uid, patch review request.
drewish at katherinehouse.com
Mon May 28 20:29:42 UTC 2007
On 5/8/07, Dries Buytaert <dries.buytaert at gmail.com> wrote:
> As most people are in favor, I think we should move forward with this
> patch. I think that some of the concerns could (and probably should)
> be addressed with a follow-up patch or two. Not sure if Darrel
> aspires to work on that, but I'd love to see us pave the path towards
> better file/document/image management. I'd love to see us make more
> baby steps towards that direction.
With the code freeze coming up I wanted to follow up on this and urge
people to take a moment to review the patch that dopry and I came up
There have been quite a few changes from what was last discussed here.
I'll try to summarize the changes as they now stand:
* The existing behavior of the upload module is preserved, deleting a
node deletes the files.
* The file_revisions table is renamed to upload. The reasoning being,
the new name makes it clear that contrib modules shouldn't put their
files in it unless they want upload.module monkeying around with them.
They can create their own table to link files to nodes.
* file_check_upload() has been merged into file_save_upload() which
now takes an array of callback functions to validate the upload before
it's saved as a temporary file. This cleans up a lot of duplicative
code in core's upload processing.
file_validate_extensions() checks that the file extension in in the given list
file_validate_size() checks for maximum file sizes and against a user's quota
file_validate_is_image() checks that the upload is an image
file_validate_image_resolution() checks that images meets maximum and minimum
* It refactors the way that upload.module determines the types and
sizes of files a user is allowed to upload and displays it on the
form. This gives the user an idea of what will be permitted before
beginning the upload.
There's still a great deal of files related work I'd like to do before
the code freeze but since this is really just a first step, it all
depends on getting this in.
More information about the development