Sylvain Wallez wrote:
Tuomo L wrote:
It would be convinient,
if one could use a protocolthat defines a source (FilePart) located in memory.
This could be for example: "multipart://foo.zip" . Then it would
be possible to extract that in-memory zip-file to the target-dir.
Is this possible already, or am I going to wrong direction here?
You know that you can access files inside zip using jar: protocol, right?
Yeah, but the jar: protocol needs a JDK URL to designate the archive file. We need a fancier "jar" source that would allow us to use sources instead, e.g. "jar:context://foo.zip!/data.txt".
... or even "jar:cocoon:/blah.zip!/data.txt" ;-)
This is not possible today, but really is the right direction, and would be a valuable addition.
Wouldn't it be too much strain on system's resources (read: memory) in production environment (with the exception of light uses like departamental server) to render this feature useless? I agree though that it might be actually convinient.
Just wondering, ;-)
I agree that uploading in memory may not be the right choice. When we'll have environment-adapters as proposed by Stefano, the choice of in memory/in temp file will be up to the sitemap writer. What's really interesting though, is to be able to access uploaded "files" (either real or in memory) using a Source.
PS Do we have TraversableInspectableRestrictableZipSource?
You forgot that we can write in an archive : TraversableModifiableInspectableRestrictableZipSource ;-D
Sylvain
-- Sylvain Wallez Anyware Technologies http://www.apache.org/~sylvain http://www.anyware-tech.com { XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects } Orixo, the opensource XML business alliance - http://www.orixo.com