Giter Site home page Giter Site logo

Comments (9)

rndme avatar rndme commented on August 16, 2024

yikes: this is the 2nd issue with office in as many days. other binary files seem to have no issue. i'll look into it and see if there's something we can do to fix it. Thanks for dropping me a line and for being so thorough in the problem description (psychically pre-answering follow-ups).

from download.

brightrain avatar brightrain commented on August 16, 2024

Yes, I can successfully download Office xls and doc as well as pdf and image formats png, jpg and gif.

Thanks for looking into this and I'll do some more testing on my side to see if I can come up with anything.

🎱 and definitely psychic : )

from download.

rndme avatar rndme commented on August 16, 2024

thanks for your time and efforts.

i wasn't able to reproduce the issue. i'm guessing that it might be non-ascii chars getting mis-encoded because the web document that's doing the downloading's charset conflicts with the file or serving encoding, but i'm have trouble replicating. i only have office2010, and i can't seem to make a file that's a problem.

It would be a *huge * help if you could find/make a small doc that has the problem because without something to put under the microscope, it's hard to find the disease...

not sure if you post public files here, so i made a one-off private uploader at http://pagedemos.com/delmetemp/ where you can send me a zip, or both files. just files, nothing fancy and explanations not needed, i'll figure it out. i'll pull that link down when i get the files and i won't share the contents with anyone.

if that's too much, can you just let me know if the file size of the orig and copy exactly matched?

from download.

brightrain avatar brightrain commented on August 16, 2024

Sure, it's the least I can do. I created a docx and xlsx file in MS Office 2013, uploaded them thru my app and then downloaded them again to reproduce the issue. Both are reported to be corrupt when attempting to open them with the same MS Office 2013 apps that created them.

Got an error trying to upload them here but you can grab them here:
https://www.dropbox.com/s/sl2qwnxuzxyqv0e/download-test.docx?dl=0

https://www.dropbox.com/s/auysstkkksxecn6/download-test.xlsx?dl=0

from download.

rndme avatar rndme commented on August 16, 2024

thanks a million. I'm getting swamped ATM, but this should help a bunch when i get a chance to dig in.

from download.

brightrain avatar brightrain commented on August 16, 2024

You bet. Let me know if I can provide anything more here.

from download.

fnicollet avatar fnicollet commented on August 16, 2024

Hello,

Ran into a similar issue and found the issue was somehow surprising. There is a regex to check if the file is a dataUrl or not:
https://github.com/rndme/download/blob/master/download.js#L64

And well, it fails when the mimetype has a "-" in it, as in ms-excel or ms-*. So it works for images, pdf, zip and all that but because of that error, download.js thought it was a simple URL and would crash.

I changed the regex to

if(/^data\:[\w+[,;]/.test(payload)){

and it fixed my issue. Might help @brightrain

Fabien

from download.

rndme avatar rndme commented on August 16, 2024

@fnicollet : aha! that makes sense. i want to keep the left-side of the mime tighter, but you made me realize that the right side needs to allow dots. this long-standing problem was fixed with a one-char commit: 70f7701 (ok, two chars for readability, but still...)

thanks again!

from download.

brightrain avatar brightrain commented on August 16, 2024

👍 This resolved the issue. Much appreciated.

from download.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.