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

On Android, appendExt is not being added to the localPath #171

Closed
shilpan opened this issue Nov 2, 2016 · 8 comments
Closed

On Android, appendExt is not being added to the localPath #171

shilpan opened this issue Nov 2, 2016 · 8 comments

Comments

@shilpan
Copy link

shilpan commented Nov 2, 2016

Here is my code:

export function downloadFile(file, url, contentType, size) {
  return (dispatch, getState) => {
    return RNFetchBlob
      .config({
        session: SESSION_NAME,
        fileCache: true,
        appendExt: 'mp4'
      })
      .fetch('GET', url)
      .then(res =>
        dispatch(addFile(file, res.path(), contentType, size)))
  }
}

The resulting file path on Android is: /data/user/0/com.stitchapp/files/RNFetchBlobTmp_faadb355-e693-45ef-aa6e-f5d18926bfc2.

Notice that .mp4 is missing. This issue does not occur on iOS.

@wkh237
Copy link
Owner

wkh237 commented Nov 3, 2016

@shilpan , thanks for reporting this issue. I've noticed this problem days ago, I'll publish a beta release contains the fix 😄

@shilpan
Copy link
Author

shilpan commented Nov 3, 2016

I'll be waiting :) it causes an issue when downloading a file locally and trying to run it with react-native-video

@wkh237
Copy link
Owner

wkh237 commented Nov 3, 2016

@shilpan , the fix is included in 0.10.0-beta.5 please upgrade the package and verify if it's fixed, thank you 👍

@Timehello
Copy link

@wkh237 Still not work on 0.10.0-beta.5

@wkh237
Copy link
Owner

wkh237 commented Nov 4, 2016

@Timehello , is it happenns on Android or IOS ?

@Timehello
Copy link

@wkh237 Android, ios is ok

@shilpan
Copy link
Author

shilpan commented Nov 4, 2016

works on 0.10.0-beta.6

@wkh237 wkh237 closed this as completed Nov 7, 2016
@Timehello
Copy link

yes, it works on beta6 !

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants