Commit f2513bf4 authored by Hirsch Singhal's avatar Hirsch Singhal Committed by GitHub
Browse files

URL Encode the File Explorer Delete/Get API. (#262)

parent 7b963300
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -7,6 +7,7 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Net;
using System.Runtime.Serialization;
using System.Threading.Tasks;

@@ -79,6 +80,7 @@ namespace Microsoft.Tools.WindowsDevicePortal
        {
            Dictionary<string, string> payload = this.BuildCommonFilePayload(knownFolderId, subPath, packageFullName);

            filename = WebUtility.UrlEncode(filename);
            payload.Add("filename", filename);

            Uri uri = Utilities.BuildEndpoint(
@@ -126,7 +128,7 @@ namespace Microsoft.Tools.WindowsDevicePortal
            string packageFullName = null)
        {
            Dictionary<string, string> payload = this.BuildCommonFilePayload(knownFolderId, subPath, packageFullName);

            filename = WebUtility.UrlEncode(filename);
            payload.Add("filename", filename);

            await this.DeleteAsync(GetFileApi, Utilities.BuildQueryString(payload));