[FLOW3-general] RFI: Handling files and file uploads
Robert Lemke
robert at typo3.org
Wed Jan 6 12:57:49 CET 2010
Hi Manuel,
in the meantime I have taken over the task to implement file uploads and resource
management and already finished most parts of it.
In the end its even easier and more powerful than you wished.
Watch out for FLOW3 1.0.0 alpha 7 ...
Cheers,
robert
Am 31.12.2009 um 10:41 schrieb Manuel Strausz:
>> 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).
>
> Hey Karsten,
> I know I'm a bit late to the party, but I didn't want to comment about it
> before I had a better grasp about the internals of the framework.
> I guess there are several options regarding handling uploads.
> I think what would be cool is to have file uploads register in the resource
> manager. I.e. $resourceManager->getUploadedFiles() would return all the
> currently uploaded files.
> Special validators could take care of validating them similarly to "normal"
> arguments, just with regards to file validation. The uploaded files could
> just be stored in a temporary directory at first.
> Then you could analyze them, move them to a different location, persist
> them, or dismiss (delete) them. It would be good to keep this kind of
> operations inside the resource object - so it can keep track of all path
> references i.e. when moving the file to a package resource directory.
> Generally, the uploaded files could be automatically copied to the current
> package's private (or public? maybe a setting for this..) resource
> directory, if all validators passed.
>
> If the uploaded files should be mapped to a domain object as object
> properties (this might not always be a good idea...), this could also use
> the same resource-object as a valueobject for the property mapping. That way
> a reference to the resource object can be stored in the persistence backend,
> and no binary data dirties the poor DBMS systems running at the far end of
> data mapping. This would however require that the resource HAS been moved to
> a package directory and is not still rotting in it's temporary upload
> directory, else persisting wouldn't make a whole lot of sense.
>
> So I hope this helps a bit and you didn't already implement all of this
> anyway ;) Just some thoughts I had after reflecting about your question for
> a while.
>
> regards,
> Manuel
> _______________________________________________
> FLOW3-general mailing list
> FLOW3-general at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/flow3-general
--
Robert Lemke
Fluent Code Artisan
http://typo3.org
http://flow3.typo3.org
More information about the FLOW3-general
mailing list