[opencms-dev] file management
afeinet at 163.com
Wed Jul 10 08:37:55 CEST 2019
I'm sorry, the following text, I am translated by Bing Translator, I hope you can understand.
Yesterday and today I spent several hours retesting this feature and found no problems.
Code is submitted today:
Or checkout this Branch: https://github.com/Yuanuo/opencms-core/tree/patch-07
The test method I use:
1, using the version provided in http://www.opencms.org/en/modules/downloads/dl-opencms-11.0-beta-distribution.html.
And the installation was successful.
Then stop the Web service.
(Because I don't use Git very much, it's a hassle for me to keep a lot of local and official changes, so my code base hasn't been synchronized with the official code base for a long time.So use this version for testing!)
2, using the code of https://github.com/Yuanuo/opencms-core/tree/patch-07, directly gradle bindist compiles a version.
3, replace the files in webapps\ROOT\WEB-INF\lib\ with the files in BuildCms\libs\ which you have compiled yourself.
4, modify the webapps\ROOT\config\opencms-vfs.xml, adding the following configuration (in the /opencms/vfs xml-path),something like:
<!-- If you have these file suffixes, drivers stored to disk are used. -->
<!-- Or file size great than ~10MB, 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" />
5, start the Web service.
At this point, you can try to upload a few large files in the Opencms Explorer management interface to try out the effect.
Need to explain:
Through the above tests, there is no problem.
But, One thing you need to note is that the length property in CmsResource uses the int type, so it means that the uploaded files cannot exceed 2G!
I tried to modify this int to long before, but there was a lot of code to modify, so I gave it up.
I can't say how good this is, but it does meet that requirement. If you think it's useful, you can optimize it better.
I hope it will help.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the opencms-dev