EinfachHans / cordova-plugin-advanced-imagepicker

Cordova Plugin for an advanced (multiple) ImagePicker
28 stars 48 forks source link

(feature-request):iOS file URL #6

Closed erikramalho closed 3 years ago

erikramalho commented 3 years ago

Feature request

First of all, congratulations for the plugin. It's really amazing and it solved many of my issues. Because you created this plugin I was able to remove 5 cordova plugins: Cordova Camera, Cordova Media Capture, Cordova Video Encoder and Cordova Image Picker :-)

The readme says iOS - Currently if you select or take an image, the result will always be encoded as base64.

How hard is it to expose the fileURL from the picture taken or the pictures the user chose on the gallery?

The idea is to be able to display a preview the results in the app...

I could sponsor this if you want :-)

EinfachHans commented 3 years ago

Hey @erikramalho 😊 Glad i could help you with this Plugin 😊 I just spent the last hours to make iOS work with fileURL too. Version 1.1.0 of this Plugin was released (Changelog).

This and other Open-Source Cordova Plugins are developed in my free time. You don't have to, but if you like my work and i could help you, you can donate me something here:

Donate

erikramalho commented 3 years ago

Hey @EinfachHans, first of all, thank you to work so fast on it. And I’ll definitely donate because your work worth it. Keep your eyes open because I’ll do it on Monday. Promise!

Could you please explain to me why you didn’t exposed showsPhotoFilters and showsVideoTrimmer for iOS as options?

Another thing that I’ve noticed is that you could change is this snippet here: if(showCameraTile) { screens.append(.photo); if(mediaType != "IMAGE") { screens.append(.video); } }

To something like this: if(showCameraTile) { if(mediaType != "IMAGE") { screens.append(.photo); } else if(mediaType != "VIDEO") { screens.append(.video); } else { screens.append(.photo); screens.append(.video); } }

I believe it should give users more controls of the options...

EinfachHans commented 3 years ago

Hey Erik, thanks 4 your Donation! Really appreciate it! 🙏🏼

The iOS Library this Plugin uses is made to look and act like the Instagram one. As i like this, but want to keep this Plugin as a Picker Plugin, i disabled the filters. Also i want ios and android to have the same main functions, which would be the case here. I will look into the the video trimmer option 🤔

About the snippet: What is the underlaying thing you want to archieve here what is not possible currently?

erikramalho commented 3 years ago

The goal of my snippet is to enable users to choose 1 - only photo gallery and photo (camera) 2 - only video gallery and video (camera) 3 - all gallery, photo and video camera

Is there a way to do it now?

Take a look at these prints: 6E59DD74-FACA-4CE7-9F99-462F38628A9D 860A57F3-7911-4CE0-B4DF-611AD4C2FA5B

EinfachHans commented 3 years ago

Ok understand. Is this possible in Android at the moment?

erikramalho commented 3 years ago

Good question LOL, I’m concentrating my first tests on iOS... I’ll just start testing Android next week if all iOS tests pass 😎

EinfachHans commented 3 years ago

Please open a new Feature Request and i will have a look in the next days 😊