From 5757a62df5776c9eb2ad70e583547a4638d1d42c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Filhoulaud?= Date: Thu, 7 Jan 2021 10:46:17 +0100 Subject: [PATCH] Fix on asset's name when a file was uploaded on multiple devices --- Device.cs | 4 ++++ Package.appxmanifest | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Device.cs b/Device.cs index e7b3321..afb89d4 100644 --- a/Device.cs +++ b/Device.cs @@ -259,6 +259,8 @@ public async Task UpdateOrderAssetsAsync(string newOrder) /// public async Task CreateAssetAsync(Asset a) { + var originalName = a.Name; + if (a.LocalToken != null) { var localFile = await StorageApplicationPermissions.FutureAccessList.GetFileAsync(a.LocalToken); @@ -284,6 +286,8 @@ public async Task CreateAssetAsync(Asset a) string resultJson = string.Empty; string parameters = $"/api/{this.ApiVersion}assets"; + a.Name = originalName; + try { HttpClient client = new HttpClient(); diff --git a/Package.appxmanifest b/Package.appxmanifest index d7389f9..b4a3aab 100644 --- a/Package.appxmanifest +++ b/Package.appxmanifest @@ -1,6 +1,6 @@  - + ScreenlyManager