diff --git a/ShareX.UploadersLib/FileUploaders/FTP/FTPAccount.cs b/ShareX.UploadersLib/FileUploaders/FTP/FTPAccount.cs index b5838d7bd..3974333bb 100644 --- a/ShareX.UploadersLib/FileUploaders/FTP/FTPAccount.cs +++ b/ShareX.UploadersLib/FileUploaders/FTP/FTPAccount.cs @@ -29,6 +29,7 @@ You should have received a copy of the GNU General Public License using System.ComponentModel; using System.Drawing.Design; using System.IO; +using System.Web; namespace ShareX.UploadersLib { @@ -168,7 +169,7 @@ public string GetUriPath(string filename, string subFolderPath = null) filename = Path.GetFileNameWithoutExtension(filename); } - filename = URLHelpers.URLEncode(filename); + filename = HttpUtility.UrlEncode(filename); if (subFolderPath == null) { @@ -176,6 +177,7 @@ public string GetUriPath(string filename, string subFolderPath = null) } UriBuilder httpHomeUri; + var httpHomePath = GetHttpHomePath(); if (string.IsNullOrEmpty(httpHomePath)) @@ -230,7 +232,7 @@ public string GetUriPath(string filename, string subFolderPath = null) } httpHomeUri.Scheme = BrowserProtocol.GetDescription(); - return Uri.EscapeUriString(httpHomeUri.Uri.ToString()); + return httpHomeUri.Uri.ToString(); } public string GetFtpPath(string filemame)