Describe the solution you'd like
- Allow custom CDN host for static files, such as
/static
, etc. - Allow custom setting for the PDF.js and StreamDownload.js host for better user experience, such as bytedance (
https://lf6-cdn-tos.bytecdntp.com/cdn/expire-1-M/pdf.js/2.1.266/pdf.worker.js
) or just all it to cloudreve itself. - Allow custom setting for the stream download filename.
2条答案
按热度按时间ujv3wf0j1#
For Cloudreve 3.X, you can directly change the static files as steps below, without building the frontend yourself:
In file
./static/js/pdf.________.chunk.js
, changei.pdfjs.GlobalWorkerOptions.workerSrc="//cdnjs.cloudflare.com/ajax/libs/pdf.js/".concat(i.pdfjs.version,"/pdf.worker.js");
toi.pdfjs.GlobalWorkerOptions.workerSrc="//lf6-cdn-tos.bytecdntp.com/cdn/expire-1-M/pdf.js/".concat(i.pdfjs.version,"/pdf.worker.js");
. The CDN host is provided by bytedance and you can get it fromcdn.bytedance.com
.In file
./static/js/6.________.chunk.js
, changehttps://jimmywarting.github.io/StreamSaver.js/mitm.html?version=2.0.0
to{yourCDNHost}/mitm.html?version=2.0.0
. You should downloadStreamSaver.js
and upload it.In file
./static/js/main.________.chunk.js
, changep=u.a.createWriteStream("archive.zip")
top=u.a.createWriteStream("{yourCustomStreamDownloadFilename}.zip")
vuktfyat2#
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.