Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mediapicker takevideo not saving video to album #564

Open
xiufengpeng opened this issue Jan 12, 2025 · 1 comment
Open

Mediapicker takevideo not saving video to album #564

xiufengpeng opened this issue Jan 12, 2025 · 1 comment

Comments

@xiufengpeng
Copy link

xiufengpeng commented Jan 12, 2025

Use the the latest VS 2022 as of 11 Jan.2025, .Net 9
Use the latest the Mediapicker nuget package

When taking a video from MAUI app on iPhone, and video is NOT saved the album folder. The source code sample is below:

    FileResult video = await MediaPicker.Default.CaptureVideoAsync();
            //  UIVideo.SaveToPhotosAlbum()
            // save the file into local storage
            string localFilePath = Path.Combine(FileSystem.CacheDirectory, video.FileName);

            using Stream sourceStream = await video.OpenReadAsync();
            using FileStream localFileStream = File.OpenWrite(localFilePath);

            await sourceStream.CopyToAsync(localFileStream);
@xiufengpeng
Copy link
Author

Additional info: on .Net 9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant