Cloudreve [Allow Custom CDN Host / Stream Download Filename Setting]

xlpyo6sf  于 5个月前  发布在  其他
关注(0)|答案(2)|浏览(56)

Describe the solution you'd like

  1. Allow custom CDN host for static files, such as /static , etc.
  2. 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.
  3. Allow custom setting for the stream download filename.
ujv3wf0j

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 , change i.pdfjs.GlobalWorkerOptions.workerSrc="//cdnjs.cloudflare.com/ajax/libs/pdf.js/".concat(i.pdfjs.version,"/pdf.worker.js"); to i.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 from cdn.bytedance.com .

In file ./static/js/6.________.chunk.js , change https://jimmywarting.github.io/StreamSaver.js/mitm.html?version=2.0.0 to {yourCDNHost}/mitm.html?version=2.0.0 . You should download StreamSaver.js and upload it.

In file ./static/js/main.________.chunk.js , change p=u.a.createWriteStream("archive.zip") to p=u.a.createWriteStream("{yourCustomStreamDownloadFilename}.zip")

vuktfyat

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.

相关问题