Skip to content
This repository has been archived by the owner on Jul 5, 2024. It is now read-only.

StoreCameraMediaOptions does not assign a Name in UWP #705

Closed
WillAutioItrax opened this issue Jun 12, 2019 · 1 comment · Fixed by #826
Closed

StoreCameraMediaOptions does not assign a Name in UWP #705

WillAutioItrax opened this issue Jun 12, 2019 · 1 comment · Fixed by #826

Comments

@WillAutioItrax
Copy link

Make sure you follow all of the setup directions before posting an issue: https://github.com/jamesmontemagno/MediaPlugin#important-permission-information

If you are creating an issue for a BUG please fill out this information. If you are asking a question or requesting a feature you can delete the sections below.

Failure to fill out this information will result in this issue being closed. If you post a full stack trace in a bug it will be closed, please post it to http://gist.github.com and then post the link here.

Bug Information

Version Number of Plugin: 4.3.0-beta
Device Tested On: Win 10 PC V1809
Simulator Tested On:N/A
Version of VS: 2017 v15.9.12
Version of Xamarin: 4.12.3.83
Versions of other things you are using:
Xamarin Forms 4.0.0.425677
NetStandard.Library 2.0.3
Microsoft.NETCore.UniversalWindowsPlatform 6.2.8
and many more

Steps to reproduce the Behavior

Run the code to take a picture in UWP.

Expected Behavior

The mediaFile object has a path that ends with the filename used in StoreCameraMediaOptions.

Actual Behavior

The mediaFile object has a path that ends with CCapture...

Code snippet

mediaFile = await CrossMedia.Current.TakePhotoAsync(new StoreCameraMediaOptions
 {
 Name = sfi.FileName,
 PhotoSize = PhotoSize.Custom,
 CustomPhotoSize = set.TakePicturePercentage
 });

 Debug.WriteLine("*** AFTER  CrossMedia.Current.TakePhotoAsync ");
 Debug.WriteLine("File Location:" + mediaFile.Path);
 Debug.WriteLine("Expected Name:" + sfi.FileName);

The output:

*** AFTER  CrossMedia.Current.TakePhotoAsync 
File Location:C:\Users\...\LocalCache\CCapture (9).jpg
Expected Name:SomethingElse.jpg

Screenshots

None

@TTalpey
Copy link

TTalpey commented Jun 23, 2019

Confirming this - photos are unconditionally stored to LocalCache\CCapture.jpg

Additional information:

  • the Directory property is similarly ignored
  • the behavior began at version 4.2.0, and 4.3.0
  • versions <= 4.1.2 honor both properties correctly (so downgrade is a workaround)
  • tested on Win10 19H1

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

Successfully merging a pull request may close this issue.

2 participants