Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,9 @@ async void DoPickAndSend()
return;

// copy it locally
var copyPath = Path.Combine(FileSystem.CacheDirectory, result.FileName);
var copyDir = FileSystem.CacheDirectory;
Directory.CreateDirectory(copyDir);
var copyPath = Path.Combine(copyDir, result.FileName);
using (var destination = File.Create(copyPath))
using (var source = await result.OpenReadAsync())
await source.CopyToAsync(destination);
Expand Down
7 changes: 5 additions & 2 deletions src/Essentials/src/FilePicker/FilePicker.uwp.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,11 @@ async Task<IEnumerable<FileResult>> PlatformPickAsync(PickOptions options, bool
resultList.Add(file);
}

foreach (var file in resultList)
StorageApplicationPermissions.FutureAccessList.Add(file);
if (AppInfoUtils.IsPackagedApp)
{
foreach (var file in resultList)
StorageApplicationPermissions.FutureAccessList.Add(file);
}

return resultList.Select(storageFile => new FileResult(storageFile));
}
Expand Down