polycarpou / expo-camera-roll-select Goto Github PK
View Code? Open in Web Editor NEWMulti Image Selector example in Expo
License: MIT License
Multi Image Selector example in Expo
License: MIT License
Hello,
First of all great example! I updated it to SDK 33 before I could test it, after the update I ran into some problems;
At first the images could not be selected because a parameter was missing. In the ImageBrowser.js getPhotos part change the params line to;
//original
let params = { first: 50, mimeTypes: ['image/jpeg'] };
//change to
let params = { first: 50, assetType: "Photos"}
After changing this on the android emulator it worked, I could select images and create the array/view the images. The Flatlist in the IOS emulator however remained empty and showed only the loading state. This was because of the groupTypes entry missing, this is needed for telling IOS what photo's directory/folders to load.
After adding the groupTypes entry my android emulator failed to open the filesystem stating it doesn't understand the groupTypes param.
Fixed this with (Import Platform from 'react-native' first);
let params = { first: 50, assetType: "Photos", groupTypes: "All" };
if (Platform.OS === 'android') {
params = { first: 50, assetType: "Photos" };
}
At this stage I have the ability to open the file system on android and IOS and select pictures. The only thing that is not working is chosing IOS photo's. The file browser opened, I could select 4 pictures and in the titlebar it states 4 Selected (Max). However when I press Choose on the IOS emulator it doesn't react to anything, where the Android emulator worked as it should.
Anyone ran into this problem as well and found a fix? (Or has a better way of getting this to work on newer SDK versions?)
The code is really nice and simple. You should really make it a npm package.
I thought maybe this had to do with Permissions, but even after asking for both CameraRoll and Camera, it still just displays "Loading" on ImageBrowser screen
I upgraded the master from v.23 to v.27 to verify, and it does indeed only break when going from 26 to 27
it keeps showing the loading text no photos shown to be selected ,can anyone help?
I don't believe this currently can be done without linking. Although Expo has added an exif
option to their ImagePicker
component. I think it will require them to add the same option to their ImageManipulator
component in order to allow for Exif data extraction on any image - please upvote my feature request on Canny! ๐ https://expo.canny.io/feature-requests/p/add-exif-data-option-in-expoimagemanipulator
the CameraRoll was split out from the core of React Native. I tried to use with this lib https://github.com/react-native-community/react-native-cameraroll
but still error
Any idea on transforming "assets-library://" uri to "file://" uri? I need to transform the image into base64.
I tried setting up the groupTypes:"All" in the params for getPhotos method along with mime types, but the videos are not showing up only images are. Any help will be appreciated.
I am unable to get photos to load.
I have a button that changes state to load the photo select tool but no photos are present
loadGallery = async() => {
const { status } = await Permissions.askAsync(Permissions.CAMERA_ROLL);
console.log(status); // granted
if(status === 'granted') {
this.setState({imageBrowserOpen: true}); // opens
}
}
The ImageBrowser page loads, but all I can get is
ListEmptyComponent={<Text>Loading...</Text>}
No photos are loading. On the getPhotos function, params does not get logged
getPhotos = () => {
let params = { first: 50, mimeTypes: ['image/jpeg'] };
console.log(params); // does not get called
...
}
it's really a amazing work for u, and saving me from the bottom of ground.
Now the pictures are upload to our storage on full size. This however also means a lot of data traffic to upload/download the images and the amount of storage used.
Can we change this to using different quality parameters? Or are we forced to install the multi-image-picker-cropper tool (which supports this with a parameter) but in turn abandon Expo?
Hello,
Thank you for the nice stuff!
So I want to upload selected pictures. Could I compress it before I upload to server?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.