Skip to content
This repository has been archived by the owner on Mar 16, 2019. It is now read-only.

Implemenet fs.hash() #476

Merged
merged 1 commit into from
Aug 10, 2017
Merged

Implemenet fs.hash() #476

merged 1 commit into from
Aug 10, 2017

Conversation

lll000111
Copy link
Contributor

This implements fs.hash(...) (link) from ticket #439

While this is a FEATURE patch I propose this to go into 0.10.9, since it involves zero code changes for any other code. If you disagree I'll resubmit the PR for 0.11.

I only tested it on Android, the code is from https://github.com/itinance/react-native-fs

@wkh237 wkh237 merged commit 67649da into wkh237:0.10.9 Aug 10, 2017
@wkh237
Copy link
Owner

wkh237 commented Aug 17, 2017

@lll000111 Sorry for taking so long, I'm really appreciate your great work 👍 Just encounter some problem when I'm trying to build the IOS project there're some errors seemed to be related to this PR. Could you check if there's something missed ?

2017-08-17 11 32 24

2017-08-17 11 32 31

2017-08-17 11 32 37

@lll000111
Copy link
Contributor Author

There is a later patch with a missing "import ..." for the hash function, all the digest code.

Line 16:

https://github.com/lll000111/react-native-fetch-blob/commit/23ef0f7e5a16dfb2d68a15ad6810227884b40842#diff-879e7400540e8bc9d4c37226e59797cd

All mixed together, not a good commit, I admit.

@lll000111
Copy link
Contributor Author

lll000111 commented Aug 17, 2017

PS: Having done quite a bit of bug searching and patching in my life and knowing the value of being able to go step by (small) step, I think in this particular case it is easier if you just take in the whole PR at once and check it as one thing. And somebody (I guess that means you) has to run the tests on iOS... but the "fs" tests should suffice if you don't have much time. I didn't really touch the fetch-related stuff.

@boukensj
Copy link

I made some changes to the hash for IOS. The hash is import for our project. We use a signed URL from our server to put the blob on AWS S3. If you want I can create a PR for IOS fixes

RickDT pushed a commit to big-swing/react-native-fetch-blob that referenced this pull request Nov 29, 2017
…h237#476)

# Conflicts:
#	android/src/main/java/com/RNFetchBlob/RNFetchBlob.java
RickDT pushed a commit to big-swing/react-native-fetch-blob that referenced this pull request Nov 29, 2017
danielsuo added a commit to danielsuo/react-native-fetch-blob that referenced this pull request Feb 13, 2018
* upstream/0.10.9:
  Fixed problem with type casting (wkh237#513)
  My proposed 0.10.9 changes (wkh237#489)
  wkh237#268 Cancelled task should not trigger `then` promise function
  Add ability to cancel android DownloadManager fetches (wkh237#502)
  Fix iOS initialization race condition (wkh237#499)
  prevent UIApplication methods from being called on background thread (wkh237#486)
  Implemenet fs.hash() -- wkh237#439 "Feature: Calculate file hash" (wkh237#476)
  I forgot one error string for the Android readFile() method (wkh237#475)
  Fix for wkh237#467 (wkh237#472)
  Fix for issue wkh237#468, wkh237#461, wkh237#460 and minor cleanup (wkh237#469)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants