spencerwooo / onedrive-cf-index

Deprecated, use new project 👇
https://github.com/spencerwooo/onedrive-vercel-index
MIT License
1.08k stars 439 forks source link

Error 1101 with .ts file #151

Closed lowprofileusername closed 3 years ago

lowprofileusername commented 3 years ago

I can download .ts file directly with ?raw and even with ?proxied . But if I click on the filename and wait. Error 1101 occurred. that's with file size of 270MB .ts file

download with ?raw for large file .e.g 10GB is fine. how do I prevent this kind of problem?

btw. how can I enable ?raw or ?proxied by default ? Say I click on the file it automatically start with raw

lowprofileusername commented 3 years ago

I fixed it by edit src/render/fileExtension.js change js: preview.code, to js: preview.video,

however it failed to load the video but do not throw Error 1101

anyway I want to know how do I enable proxied by default.

beetcb commented 3 years ago

Hi @lowprofileusername

Delete a specific file extension in src/render/fileExtension.js will disable the preview of such documents and turn raw feature on.

If you wanna proxied download by default. I can come up with this trick -> simply modify this line: https://github.com/spencerwooo/onedrive-cf-index/blob/62886c06afa3c62e74c1d09b2481ce5f7349ca91/src/index.js#L76 To:

const proxied = config.proxyDownload ? true : false 
lowprofileusername commented 3 years ago

Thanks for your help. it works.