[opencms-dev] create resource with api

Achim Westermann Achim.Westermann at gmx.de
Tue Jul 6 11:39:23 CEST 2010


Hi Valerio, 

no, there is no full streaming support in OpenCms yet. While the low level driver layer (VfsDriver.writeContents(...)) already supports using a stream the higher levels and CmsFile rely on carrying the complete content in RAM. 
Never had any troubles with this. After all you are able to set 
maxfileuploadsize in opencms-workplace.xml. Note that even a full streaming API would not prevent end users from uploading so much that your database gets bloated. 

HTH, 

Achim

> Hi list,
> 
>  
> 
> I would ask you, if you know a better way to create a new resource in
> Opencms VFS through the API, I am currently using the following method:
> 
>  
> 
> cmsObject.createResource(resourcename, type, content, properties)
> 
>  
> 
> the problem I see is that this method uses a byte array as input parameter
> for the content, and I think that this should be a problem if many
> concurrent users use my function to upload a new file
> 
> in OCMS VFS.
> 
>  
> 
> Is there a method that uses a inputstream for the content?
> 
>  
> 
> Kind regards,
> 
>  
> 
> Valerio
> 



More information about the opencms-dev mailing list