You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Validate input arguments and improve file upload handling
Added validation to ensure at least one input file is provided. Simplified format argument parsing and modified upload logic to include indexed file names in form data. Minor code formatting adjustments for readability.
@@ -48,8 +56,8 @@ public static async Task Main(string[] args)
48
56
}
49
57
}
50
58
51
-
stringfromFormat=Directory.Exists(outputFile)?(args.Length>3?args[^2]:thrownewArgumentException("[from-format] is required when output path is a folder.")):Path.GetExtension(inputFiles[0]).Trim('.').ToLower();
52
-
stringtoFormat=Directory.Exists(outputFile)?(args.Length>4?args[^1]:thrownewArgumentException("[to-format] is required when output path is a folder.")):Path.GetExtension(outputFile).Trim('.').ToLower();
0 commit comments