Comments (9)
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.
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.
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.
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.
thanks a million. I'm getting swamped ATM, but this should help a bunch when i get a chance to dig in.
from download.
You bet. Let me know if I can provide anything more here.
from download.
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.
@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.
👍 This resolved the issue. Much appreciated.
from download.
Related Issues (20)
- Unable to download JSON file properly HOT 2
- Can't download ArrayBuffer
- After compilation:Error HOT 1
- Chrome don't support download attribute in anchor tag HOT 2
- Live demos in readme.md are broken HOT 1
- Download PDF on IOS Chrome
- Example for React projects HOT 1
- Unable to generate .xlsx file from the data HOT 1
- Chinese file names cannot be downloaded. HOT 1
- anyone had problems using many chrome parallel downloads? HOT 2
- How to send generated image to server without downloading it in react js? HOT 2
- Issue with downloading text which includes 'ú' character HOT 1
- DownloadJs is not working inside In-App browsers HOT 2
- ts readme
- check integrity of downloaded files
- Download progress not showing in browser
- TXT URL not working with RELATIVE PATH HOT 2
- mimeType error HOT 2
- What about downloads with method as post and parameters? HOT 1
- 能否返回下载完成 HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from download.