
Security News
Crates.io Users Targeted by Phishing Emails
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
@magiclab/react-native-gallery-manager
Advanced tools
This version is customised to support iCloud library and Calabash support for automation.
npm install --save react-native-gallery-manager
or
yarn add react-native-gallery-manager
and then
react-native link
NOTE: If you are using CameraRoll from react-native, you have to unlink it before using this library
import GalleryManager from 'react-native-gallery-manager';
GalleryManager.getAssets({
type: 'all',
startFrom: 0,
}).then((response) => {
}).catch((err) => {
// no rejects are defined currently on iOS
})
Props | Type | Default | Notes |
---|---|---|---|
type | String | 'all' | Type of the asset returned, can be 'image', 'video', 'all' |
limit | Number | 10 | how many asset to return in one call |
startFrom | Number | 0 | From which index to start |
albumName | String | Set the name of the album from which you want assets (Optional) |
{
assets:[
{
type:'image',
uri:'file:///storage/emulated/0/Download/ylo6z7D.jpg',
id:38,
filename:'ylo6z7D.jpg',
width:3456,
height:1944,
creationDate:'1517064428',
duration:0,
mimeType:'image/jpeg'
},
...
],
totalAssets:7,
next:7,
hasMore:false
}
GalleryManager.getAlbums().then((response) => {
}).catch((err) => {
// no rejects are defined currently on iOS
})
{
albums:
[
{
assetCount: 616, title: 'WhatsApp'
},
{
assetCount: 6, title: 'Instagram'
},
{
assetCount: 1, title: 'Twitter'
},
...
],
totalAlbums: 24
}
GalleryManager.requestAuthorization(title, message).then((response) => {
// response.isAuthorized = true || false
}).catch((err) => {
})
Props | Type | Default | Notes |
---|---|---|---|
title | String | (Android) title of the dialog | |
message | String | (Android) message in the dialog |
GalleryManager.convertVideo({
id: '98F14DF6-3BF9-4D1B-A6E0-0A36A25AE377/L0/001',
convertTo: 'm4v',
quality: 'low'
}).then((response) => {
console.log(response);
}).catch((err) => {
console.log(err)
});
Props | Type | Default | Notes |
---|---|---|---|
id | String | The id of the video asset | |
convertTo | String | Can be mpeg4, m4v or mov | |
quality | String | original | Can be original, high, medium, low |
{
mimeType: 'video/x-m4v',
path: 'file:///Users/pentarex/Library/Developer/CoreSimulator/Devices/81873DB4-A220-4F60-88B8-87521BB231E6/data/Containers/Data/Application/91EE6566-4D04-4E33-9608-EDB06DA6C6D2/Documents/8DAEDFBC-9E16-442D-A98F-E145F429DA0B.m4v',
filename: '8DAEDFBC-9E16-442D-A98F-E145F429DA0B.m4v',
type: 'video',
duration: 19.185833333333335
}
The reason the library is returning the path of the file in this format is that the video can be send later to server with fetch library. If the url starts with assets-library:// not with file:// react-native will not send it.
FAQs
List Gallery content from React-Native
We found that @magiclab/react-native-gallery-manager demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
Product
Socket now lets you customize pull request alert headers, helping security teams share clear guidance right in PRs to speed reviews and reduce back-and-forth.
Product
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.