[opencms-dev] file management
vswm at free.fr
vswm at free.fr
Mon Jul 8 09:53:22 CEST 2019
I have the same need ( storing very big files outside the database)
Your idea seems good and I am very interested in your code!
If you are agree to share your code, here is my @mail : vswm at free.fr
Thanks in advance.
Le 8 juillet 2019 07:35:48 GMT+02:00, "脸谱" <afeinet at 163.com> a écrit :
>Finally see others have this need, share my experience here.
>Last year, I also had the idea of storing some large files directly on
>disks outside the database.And then I did it myself.
>The implementation principle is like this, for example, to store a 1G
>Store the data directly on disk when uploading files;
>Store the file path stored on disk as the contents of the VFS file for
>OpenCMS;(At the front of this stored path I used a few special letters
>"REFS::" do the mark)
>When the end user accesses this file, the contents of the VSF file are
>first read from inside the database, and then the first few bytes are
>taken to determine if it is "REFS::", at this point the file data on
>the disk is read directly to return to the client.
>At the time, I fully implemented these features, and it was configured
>to decide what files could be stored on disk rather than in the
>I've added this configuration to opencms-vfs.xml (by the file name
><!-- If you have these file suffixes, drivers stored to disk are used.
><!-- Otherwise, using the default implementation, the content is stored
>in the database. -->
><driver class="org.opencms.file.content.CmsFileContentDriver" />
>And to implement such a function, modify a large number of code, also
>passed the test, the actual operation did not have a problem.
>Of course, this approach may be completely different from what
>officials mentioned before, although they have now given up on
>implementing this feature. If someone is interested in this, I can
>share the code that implements this feature.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the opencms-dev