Comments (13)
And just to cover my bases. I also tried this with a for
loop, instead of a forEach
on the off chance that somehow the items were not being appended in order:
for (var i = 0, len = collectedArray.length; i < len; i += 1) {
spark.append(collectedArray[i]);
}
from js-spark-md5.
I can't see anything wrong from the usage perspective. Can you create a small reproducible fiddle so I can play around and identify the issue? A zip file would also sufice.
from js-spark-md5.
Hi @satazor, I created a small demo that performs the following steps:
- downloads an image
- slices it up
- stores it
- displays it
... - loads it
- displays a second one (from the idb data)
- runs append on the array of elements (attached md5 to html)
- merges arrays of arraybuffers into one
- displays the md5 for that
You can check it out, run a local http server in the directory, and view the index.html. Be sure to open the console as a lot info is contained there.
As you'll see the original md5 is displayed first (static), then the one from the series of appends (incorrect) then another from a merged arraybuffer (correct).
I tried to keep it very simple, give it a shot and let me know what you think.
https://github.com/silverbucket/md5example
from js-spark-md5.
Thanks @silverbucket will look at it later today, after work.
from js-spark-md5.
There was a bug indeed in the SparkMD5.ArrayBuffer
but that was fixed in 9f54482. Your example is using an outdated version of SparkMD5
. I've tested your example with 2.0.0
and 1.0.1
versions and it works correctly!
from js-spark-md5.
from js-spark-md5.
Oh, I missed that update. Since I use node as my build environment (with
browserify) I cannot simply include a file from the SparkMD5 repository, I
must manually copy it into the project whenever I see an update.
Any chance for adding a build step which creates a file that uses the node
module system of module.exports ? I know it's not meant to run in node, but
taking into account the npm+node build environment, it still has a lot of
benefits.
On Mon, Nov 2, 2015 at 1:29 PM André Cruz [email protected] wrote:
[image: screen shot 2015-11-02 at 12 27 55]
https://cloud.githubusercontent.com/assets/1017236/10881728/4a9b00cc-815d-11e5-89cd-0e17435b7be6.png—
Reply to this email directly or view it on GitHub
#31 (comment).
from js-spark-md5.
ie. so that there's a third file: node-sparkmd5.js or something?
from js-spark-md5.
Are you sure you published the latest version(s) of SparkMD5 to npm? I'm still getting v1.0.0
from js-spark-md5.
Sorry, it should be published now. Totally forgot.
from js-spark-md5.
Regarding the npm/node usage, it should work out of the box, see: https://github.com/satazor/SparkMD5/blob/master/spark-md5.js#L4 and https://github.com/satazor/SparkMD5/blob/master/package.json#L5
from js-spark-md5.
Ah, right, not sure why I decided that wouldn't work before. Works fine for me now :)
Thanks!
from js-spark-md5.
I want to upload a file of 1GB with chunk size of 1MB each and i wish to calculate and validate each chunk with checksum on server, can someone point me in correct direction?
from js-spark-md5.
Related Issues (20)
- Streams HOT 3
- Different md5 for the same file HOT 6
- License issue HOT 4
- Speed comparison to js-md5 HOT 2
- Demo link problem
- Provide functionality for calculating MD5 hashes of files HOT 3
- Array buffer allocation failed
- Seems like it doesn't work in Edge for cyrillic symbols HOT 2
- spark.end(); The results after two executions are different HOT 2
- No tag or release for 3.0.1 HOT 2
- MD5 Computed In IE11 Not Steady HOT 1
- IE10 compute file md5 failed
- Is there a sample implementation for react native expo? HOT 1
- in IE is error HOT 1
- md5 error ( d41d8cd98f00b204e9800998ecf8427e for all big files than 600M) HOT 1
- Fix deprecated unescape
- Provide ESM build HOT 5
- Uncaught TypeError: Cannot read properties of undefined (reading 'ArrayBuffer')
- URIError: malformed URI sequence HOT 1
- 超大体积文件多线程计算 HOT 2
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 js-spark-md5.