React-native-fs: Support assets-library tag

Created on 3 Nov 2015  路  15Comments  路  Source: itinance/react-native-fs

Is there any chance to support assets-library tag url? ex: assets-library://asset/asset.JPG?id=1A85E963-XXXX-XXXX-XXXX-A497490A93B9&ext=JPG

enhancement

Most helpful comment

Ah, good hint. I already have the code for video finished and use it in another app natively so far.
Will put it into the library

All 15 comments

@cjdell what do you think about this? Is there an equivalent for Android?

@johanneslumpe Sorry for the late reply. Android's method of accessing assets is to use file:/// URL. We could extend support to all URL formats supported by the platform, so long as it doesn't lead to ambiguities. I think both can convert URL to absolute path and vice versa.

Can we start some sort of wish list for requested features? I will be using this library in other projects so am happy to put the time in to improve it :-)

@cjdell sorry for not replying here - kind of forgot about it. I think a feature-request thread/list might be useful to consolidate things in a single place and then to figure out what's priority.

Anyone working on this?

@superandrew213 not to my knowledge

I can't load image from CameraRoll on iPhone.
assets-library://asset/asset.JPG?id=1A85E963-XXXX-XXXX-XXXX-A497490A93B9&ext=JPG.

Is it possible now ?

Not yet

This is done now by https://github.com/itinance/react-native-fs/pull/286: "copyAssetsFileIOS()"

@itinance Hm, but what about video?!

Ah, good hint. I already have the code for video finished and use it in another app natively so far.
Will put it into the library

@itinance great! It was strange for me cause methods name mean that it can copy both video and audio

@itinance Is is now possible to use copyAssetsFileIOS() with videos? I'm not sure how to get this working. My videos are being saved as JPEG files :rofl:

For Videos another approach is required. I've already wrote the method in iOS, i still need to add the javascript-bridge. I will provide this on the Weekend.

Hi @itinance, sorry to bug you again! Have you had any luck getting this working? I appreciate your work buddy thanks in advance 馃槃

I have url something like this:
assets-library://asset/asset.JPG?id=98EBA95A-254E-40F4-8E1D-C355D8795777&ext=JPG'

I need to convert it to something like this :
'content://media/external/images/media/30993'.

Can I make use of this copyAssetsFileIOS( ) and pass this asset-library url as param.?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

barnir picture barnir  路  3Comments

onzag picture onzag  路  3Comments

duckmyanmar picture duckmyanmar  路  3Comments

crobinson42 picture crobinson42  路  4Comments

zaheerahmad92001 picture zaheerahmad92001  路  3Comments