<div dir="ltr"><div dir="ltr">Thanks for your support<div><br></div><div>i am interested in your code, can you shared it please</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">El lun., 8 jul. 2019 a las 0:36, 脸谱 (<<a href="mailto:afeinet@163.com">afeinet@163.com</a>>) escribió:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="line-height:1.7;color:rgb(0,0,0);font-size:14px;font-family:Arial"><br><div>Finally see others have this need, share my experience here.</div><div><br></div><div>Last year, I also had the idea of storing some large files directly on disks outside the database.And then I did it myself.</div><div><br></div><div>The implementation principle is like this, for example, to store a 1G MP4 file,</div><div>Store the data directly on disk when uploading files;</div><div>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)</div><div>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. </div><div><br></div><div>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.</div><div>I've added this configuration to opencms-vfs.xml (by the file name suffix):</div><div><br></div><div><filecontent></div><div><span style="white-space:pre-wrap"> </span><handle></div><div> <!-- If you have these file suffixes, drivers stored to disk are used. --></div><div><span style="white-space:pre-wrap"> </span><driver class="org.opencms.file.content.refs.CmsFileContentDriver"></div><div><span style="white-space:pre-wrap"> </span><param name="refs.marker">REFS::</param></div><div><span style="white-space:pre-wrap"> </span><param name="refs.storage">../REFS-DISK1</param></div><div><span style="white-space:pre-wrap"> </span></driver></div><div><span style="white-space:pre-wrap"> </span><extension value=".mp3"/></div><div><span style="white-space:pre-wrap"> </span><extension value=".mp4"/></div><div><span style="white-space:pre-wrap"> </span><extension value=".rar"/></div><div><span style="white-space:pre-wrap"> </span><extension value=".zip"/></div><div><span style="white-space:pre-wrap"> </span><extension value=".exe"/></div><div><span style="white-space:pre-wrap"> </span><extension value=".pdf"/></div><div><span style="white-space:pre-wrap"> </span></handle></div><div><span style="white-space:pre-wrap"> </span><handle></div><div> <!-- Otherwise, using the default implementation, the content is stored in the database. --></div><div><span style="white-space:pre-wrap"> </span><driver class="org.opencms.file.content.CmsFileContentDriver" /></div><div><span style="white-space:pre-wrap"> </span></handle></div><div></filecontent></div><div><br></div><div><br></div><div>And to implement such a function, modify a large number of code, also passed the test, the actual operation did not have a problem.</div><div><br></div><div>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.</div><br><br><br><div style="zoom:1">--<br><div><br></div>
<div>缘起法实不可思议也。</div></div></div><br><br><span title="neteasefooter"><p> </p></span>_______________________________________________<br>
This mail is sent to you from the opencms-dev mailing list<br>
To change your list options, or to unsubscribe from the list, please visit<br>
<a href="http://lists.opencms.org/cgi-bin/mailman/listinfo/opencms-dev" rel="noreferrer" target="_blank">http://lists.opencms.org/cgi-bin/mailman/listinfo/opencms-dev</a><br>
<br>
<br>
<br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div>Atentamente,</div><div><br></div><div>Yamit David Moreno Socha</div><div><br></div><div dir="ltr"><br></div></div><div dir="ltr"><br></div><div dir="ltr"><font color="#999999" size="1"><br></font></div><div dir="ltr"><font color="#999999" size="1">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. <br><br>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.</font><strong style="font-size:small"><font color="#999999" size="1"> </font></strong><br></div></div></div></div></div></div></div></div></div></div></div></div></div></div>
<br>
<font color="gray" size="1"><b>AVISO DE CONFIDENCIALIDAD</b>: 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. <br><br><b>CONFIDENTIALITY NOTICE</b>: 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.<br></font><br>