Skip to content

Commit 1b60a1a

Browse files
committed
chore(filename): Regenerated sending filename of filename rather than null if no filename is requi
1 parent 6e0fdbd commit 1b60a1a

File tree

4 files changed

+11
-11
lines changed

4 files changed

+11
-11
lines changed

Scripts/Services/CompareComply/V1/CompareComplyService.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ public bool ClassifyElements(Callback<ClassifyReturn> callback, System.IO.Memory
257257
req.Forms = new Dictionary<string, RESTConnector.Form>();
258258
if (file != null)
259259
{
260-
req.Forms["file"] = new RESTConnector.Form(file, null, fileContentType);
260+
req.Forms["file"] = new RESTConnector.Form(file, "filename", fileContentType);
261261
}
262262
if (!string.IsNullOrEmpty(model))
263263
{
@@ -342,7 +342,7 @@ public bool ExtractTables(Callback<TableReturn> callback, System.IO.MemoryStream
342342
req.Forms = new Dictionary<string, RESTConnector.Form>();
343343
if (file != null)
344344
{
345-
req.Forms["file"] = new RESTConnector.Form(file, null, fileContentType);
345+
req.Forms["file"] = new RESTConnector.Form(file, "filename", fileContentType);
346346
}
347347
if (!string.IsNullOrEmpty(model))
348348
{
@@ -433,11 +433,11 @@ public bool CompareDocuments(Callback<CompareReturn> callback, System.IO.MemoryS
433433
req.Forms = new Dictionary<string, RESTConnector.Form>();
434434
if (file1 != null)
435435
{
436-
req.Forms["file_1"] = new RESTConnector.Form(file1, null, file1ContentType);
436+
req.Forms["file_1"] = new RESTConnector.Form(file1, "filename", file1ContentType);
437437
}
438438
if (file2 != null)
439439
{
440-
req.Forms["file_2"] = new RESTConnector.Form(file2, null, file2ContentType);
440+
req.Forms["file_2"] = new RESTConnector.Form(file2, "filename", file2ContentType);
441441
}
442442
if (!string.IsNullOrEmpty(file1Label))
443443
{
@@ -976,7 +976,7 @@ public bool CreateBatch(Callback<BatchStatus> callback, string function, System.
976976
req.Forms = new Dictionary<string, RESTConnector.Form>();
977977
if (inputCredentialsFile != null)
978978
{
979-
req.Forms["input_credentials_file"] = new RESTConnector.Form(inputCredentialsFile, null, "application/json");
979+
req.Forms["input_credentials_file"] = new RESTConnector.Form(inputCredentialsFile, "filename", "application/json");
980980
}
981981
if (!string.IsNullOrEmpty(inputBucketLocation))
982982
{
@@ -988,7 +988,7 @@ public bool CreateBatch(Callback<BatchStatus> callback, string function, System.
988988
}
989989
if (outputCredentialsFile != null)
990990
{
991-
req.Forms["output_credentials_file"] = new RESTConnector.Form(outputCredentialsFile, null, "application/json");
991+
req.Forms["output_credentials_file"] = new RESTConnector.Form(outputCredentialsFile, "filename", "application/json");
992992
}
993993
if (!string.IsNullOrEmpty(outputBucketLocation))
994994
{

Scripts/Services/LanguageTranslator/V3/LanguageTranslatorService.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -420,11 +420,11 @@ public bool CreateModel(Callback<TranslationModel> callback, string baseModelId,
420420
req.Forms = new Dictionary<string, RESTConnector.Form>();
421421
if (forcedGlossary != null)
422422
{
423-
req.Forms["forced_glossary"] = new RESTConnector.Form(forcedGlossary, null, "application/octet-stream");
423+
req.Forms["forced_glossary"] = new RESTConnector.Form(forcedGlossary, "filename", "application/octet-stream");
424424
}
425425
if (parallelCorpus != null)
426426
{
427-
req.Forms["parallel_corpus"] = new RESTConnector.Form(parallelCorpus, null, "application/octet-stream");
427+
req.Forms["parallel_corpus"] = new RESTConnector.Form(parallelCorpus, "filename", "application/octet-stream");
428428
}
429429
if (!string.IsNullOrEmpty(baseModelId))
430430
{

Scripts/Services/NaturalLanguageClassifier/V1/NaturalLanguageClassifierService.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -319,11 +319,11 @@ public bool CreateClassifier(Callback<Classifier> callback, System.IO.MemoryStre
319319
req.Forms = new Dictionary<string, RESTConnector.Form>();
320320
if (metadata != null)
321321
{
322-
req.Forms["training_metadata"] = new RESTConnector.Form(metadata, null, "application/json");
322+
req.Forms["training_metadata"] = new RESTConnector.Form(metadata, "filename", "application/json");
323323
}
324324
if (trainingData != null)
325325
{
326-
req.Forms["training_data"] = new RESTConnector.Form(trainingData, null, "text/csv");
326+
req.Forms["training_data"] = new RESTConnector.Form(trainingData, "filename", "text/csv");
327327
}
328328

329329
req.OnResponse = OnCreateClassifierResponse;

Scripts/Services/SpeechToText/V1/SpeechToTextService.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2136,7 +2136,7 @@ public bool AddCorpus(Callback<object> callback, string customizationId, string
21362136
req.Forms = new Dictionary<string, RESTConnector.Form>();
21372137
if (corpusFile != null)
21382138
{
2139-
req.Forms["corpus_file"] = new RESTConnector.Form(corpusFile, null, "text/plain");
2139+
req.Forms["corpus_file"] = new RESTConnector.Form(corpusFile, "filename", "text/plain");
21402140
}
21412141
if (allowOverwrite != null)
21422142
{

0 commit comments

Comments
 (0)