fixing issue where a space in the file name causes 400 errors: #14 · 7e292b6f70 - SVN.BY: Go Git Service
Просмотр исходного кода

fixing issue where a space in the file name causes 400 errors: #14

Tiernan OToole лет назад: 10
Родитель
Сommit
7e292b6f70
1 измененных файлов с 1 добавлено и 0 удалено
  1. 1 0
      B2Uploader/Program.cs

+ 1 - 0
B2Uploader/Program.cs

213
         static string getValidFilename(string input)
213
         static string getValidFilename(string input)
214
         {
214
         {
215
             string fileName = input.Replace('\\', '/');
215
             string fileName = input.Replace('\\', '/');
216
+            fileName = fileName.Replace(' ', '_');
216
             if (fileName.StartsWith("/"))
217
             if (fileName.StartsWith("/"))
217
             {
218
             {
218
                 fileName = fileName.Substring(1);
219
                 fileName = fileName.Substring(1);