[opencms-dev] file management
Yamit David Moreno Socha
yamit.moreno at uptc.edu.co
Mon Jul 8 15:30:46 CEST 2019
Thanks for your support
i am interested in your code, can you shared it please
El lun., 8 jul. 2019 a las 0:36, 脸谱 (<afeinet at 163.com>) escribió:
>
> 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 MP4
> file,
> 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 database.
> I've added this configuration to opencms-vfs.xml (by the file name suffix):
>
> <filecontent>
> <handle>
> <!-- If you have these file suffixes, drivers stored to disk are
> used. -->
> <driver class="org.opencms.file.content.refs.CmsFileContentDriver">
> <param name="refs.marker">REFS::</param>
> <param name="refs.storage">../REFS-DISK1</param>
> </driver>
> <extension value=".mp3"/>
> <extension value=".mp4"/>
> <extension value=".rar"/>
> <extension value=".zip"/>
> <extension value=".exe"/>
> <extension value=".pdf"/>
> </handle>
> <handle>
> <!-- Otherwise, using the default implementation, the content is
> stored in the database. -->
> <driver class="org.opencms.file.content.CmsFileContentDriver" />
> </handle>
> </filecontent>
>
>
> 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.
>
>
>
> --
>
> 缘起法实不可思议也。
>
>
>
> _______________________________________________
> This mail is sent to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, please visit
> http://lists.opencms.org/cgi-bin/mailman/listinfo/opencms-dev
>
>
>
>
--
Atentamente,
Yamit David Moreno Socha
AVISO DE CONFIDENCIALIDAD: Este mensaje y sus adjuntos se dirigen
exclusivamente a su destinatario, puede contener información
privilegiada o confidencial y es para uso exclusivo de la persona o
entidad de destino. Si no es usted. el destinatario indicado, queda
notificado de que la lectura, utilización, divulgación y/o copia sin
autorización puede estar prohibida en virtud de la legislación
vigente. Si ha recibido este mensaje por error, le rogamos que nos lo
comunique inmediatamente por esta misma vía y proceda a su dest!
rucción.
CONFIDENTIALITY NOTICE: The information contained in this transmission
is privileged and confidential information intended only for the use
of the individual or entity named above. If the reader of this message
is not the intended recipient, you are hereby notified that any
dissemination, distribution or copying of this communication is
strictly prohibited. If you have received this transmission in error,
do not read it. Please immediately reply to the sender that you have
received this communication in error and then delete it.
--
*AVISO DE CONFIDENCIALIDAD*: Este mensaje y sus adjuntos se dirigen
exclusivamente a su destinatario, puede contener información privilegiada o
confidencial y es para uso exclusivo de la persona o entidad de destino. Si
no es usted. el destinatario indicado, queda notificado de que la lectura,
utilización, divulgación y/o copia sin autorización puede estar prohibida
en virtud de la legislación vigente. Si ha recibido este mensaje por error,
le rogamos que nos lo comunique inmediatamente por esta misma vía y proceda
a su destrucción.
*CONFIDENTIALITY NOTICE*: The information contained in
this transmission is privileged and confidential information intended only
for the use of the individual or entity named above. If the reader of this
message is not the intended recipient, you are hereby notified that any
dissemination, distribution or copying of this communication is strictly
prohibited. If you have received this transmission in error, do not read
it. Please immediately reply to the sender that you have received this
communication in error and then delete it.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20190708/ecd73e60/attachment.htm>
More information about the opencms-dev
mailing list