[FLOW3-general] RFI: Handling files and file uploads
Denyer Ec
denyerec at gmail.com
Mon Nov 23 16:48:41 CET 2009
>On Mon, Nov 23, 2009 at 2:36 PM, Karsten Dambekalns <karsten at typo3.org> wrote:
> So, from a developers point of view, how would you like to use files and
> file uploads in your work? Just imagine some application you have been
> working on and think of the most pleasurable way this could have been
> done with the perfect framework we try to be(come).
If you want an idiot's perspective on things, then read on :)
I'd instantiate a FILE object for each uploaded file, pre-populating
the properties of the object based on the detected filetype of the
uploaded file (Simple generic file base class, extended inheritance
supporting any type of file). Then all operations such as renaming,
moving, etc would be handled through the class interface rather than
meddling with the file direct.
Safety net for finding orphans and finding the referenced file in the
allowed file tree would be nifty and, if the object is populated with
things like file create/modified date and filesize, finding the file
in the filesystem should it be moved by something other than the
controlling class would be fairly straightforward. The FILE objects
would persist, just like anything else. Of course the most important
attribute is "filename", closely followed by "filesystemPath".
Presumably then users could extend a given filetype's class with
methods to auto-generate previews, movies, thumbnails, digests, EXIF
comments or suchlike on upload, as well as incorporating filetype
specific validators or inspection methods. Through the AOP framework
I'm guessing these could be cross-cutted in or some other such lingo,
but I'm still very unfamiliar with that methodology and language so
don't burn me at the stake if I'm wide of the mark!
I'd also look at handling uploads through several upload interfaces,
so that you can support file uploads from a web form, or via an upload
folder on an FTP root, email attachment or such. The mechanism for
ingesting the input files would be very similar, but supporting
different methods of getting the files into the system in the first
place would be neat.
Very high level description I'm afraid and I apologise if I've wasted
anyones time with my rambling, the T3 mailing lists are somewhat
fierce with their reprimands!
Kind regards,
Denyer
-------
http://gallery.denyerec.co.uk
More information about the FLOW3-general
mailing list