I can not save video file to iOS(to be visible in Photos app).
I have tried some plugins but they only save IMAGE(not video) to Photos.
I have used:
image_picker_saver: 0.3.0
It works fine for saving images(iOS), and rotates image for 90 degrees on Android.
For recording, I'm using image_picker: ^0.6.0+10
Any ideas?
Thanks.
Edit:
In the meantime, we have developed a plugin which supports saving both images and videos to gallery(android)/photos(ios), from Camera or url.
https://pub.dev/packages/gallery_saver
it has methods saveImage and saveVideo that take path or url(String).
Aside from the mentioned gallery_saver gallery_saver. There is another existing package that would do the trick, image_gallery_saver. Check this blog for the complete guide on how to save files to your own Flutter App Folder in Internal Phone Storage on Android and to the Photos Library on iOS Device. See also the package file_saver, which is another pretty decent plugin for saving files with formats like PDF, MP3, MP4, etc.
Related
I'm building a video app uploader using react-native.
I encounter a problem with file management from cameraroll. I have video inside my camera roll that i want to either play in my app (using rn-video), or upload them.
I tried using react-native-image-crop-picker with Passtrough option that should not compress video, but i feel like it's copying the video from cameraroll of iOS to AppData. So for big video i'm stuck sometime a longtime on "Processing Asset ..." window (see post here).
Now my question is, using react-native-cameraroll, i can fetch directly information about local video, but what i get is a link like this : ph://EA9508C5-6B69-46EC-8980-832774283946/L0/00
Is there a way to transform this link into something like this : 'file:///sdcard/Movies/sintel.mp4' without copying the video entirely into my appData (to avoid long import)
Thanks in advance
After some research, i found that we can use a different path called assets-library in iOS :
assets-library://asset/asset.${'mov'}?id=${appleId}&ext=${'mov'}
If you use this path with appleId being the ph asset identificator (something that look like this : const appleId = 'EFA45A33-818E-4A67-A0D8-50991A9B89FB/L0/001' it will work perfectly.
It will work with react-native-fs //File system for RN for copy/paste video for example
I have found lots of answers regarding how to download and save online photos to the app's cache or temporary directory. However, I need to know how to copy an image from the device's local gallery to the app's cache.
The reason for this is a strange problem with iOS, where attempting to upload images to Firebase, using paths of images in the gallery, always fails in a physical device and always works in iOS simulator and Android (both physical and simulated). In the app I am building I also have the ability to take photos, which are saved to the app's directories by the camera app, and those uploads work fine. I need to try and first copy the images to my cache, to test if it will allow me to upload them to firebase successfully. I am using multi_image_picker to get the local paths of the selected images from the gallery, all I need is to know, once I have those paths, how to copy a single one of those files to my app's temp directory (I use path_provider to get the appropriate path to temp directory).
It probably isn't a permissions issue because I have both Camera and Photo Library permissions in my plist.info, I get prompted for access and I can access the gallery without a problem when using the multi picker.
I have tried looking at the camera plugin's files and figure out how it does it, but no luck, I get lost once the plugin calls native methods.
I appreciate any help.
I'm downloading video files to application documents directory and i need to copy my downloaded videos to camera roll. How can i do this with react native?
Thanks
The CameraRoll API would be the place to have a look at, maybe the saveimagewithtag method works for you. Otherwise, there is no built-in possibility and you would have to implement it on your own.
I am using Xamarin to develop an IOS app. Here the user has an option to download audio files to the document folder within the app, and play it later on.
But i would like to provide an option for the user to access it in music folder or somewhere else, so that user does not have to come back to app to listen it.
Like we save images to camera roll, can we save mp3 or any other audio file to default music folder in IOS. Any solution or ideas using xamarin or xcode are welcome.
Note: I already know about File Sharing with itunes, i am looking for something else explained above.
As I know this isn't possible due to the limitations within iOS
I have a web app designed for use on an iOS device. The web app includes file uploaders, which are meant to allow the user to upload an image from their iOS device or take an image from their camera.
The issue I'm running into is that I want the user to be able to upload PNG images through this interface, as well.
What is happening, though, is that it seems iOS renames the file image.jpg before it is sent to the web app, not honoring the original file extension. This is only an issue because I am trying to preserve transparency in the .png files, and this is lost in the extension renaming.
Any thoughts on how to handle this? Thanks, in advance, for any assistance on this front.
Mobile Safari only allows the uploads of jpeg's at this time. If you try to upload a png it will be (heavily) compressed into the jpeg format and then uploaded to the server.
The only way we have been about to get around this is by creating a native app for iOS and uploading the image through the Cocoa-Touch API's.
I've filed a Bug report with apple for this issue. Bug ID: 14494395