Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ partial void ProcessRetrieveFileResponseContent(
PrepareRetrieveFileRequest(
httpClient: HttpClient,
httpRequestMessage: __httpRequest,
fileId: fileId);
fileId: fileId!);

return __httpRequest;
}
Expand Down
30 changes: 29 additions & 1 deletion src/libs/MiniMax/Generated/MiniMax.FilesClient.UploadFile.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,37 @@ partial void ProcessUploadFileResponseContent(
}
var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent();
__httpRequestContent.Add(
content: new global::System.Net.Http.StringContent($"{request.Purpose}"),
content: new global::System.Net.Http.StringContent(request.Purpose ?? string.Empty),
name: "\"purpose\"");
var __contentFile = new global::System.Net.Http.ByteArrayContent(request.File ?? global::System.Array.Empty<byte>());
__contentFile.Headers.ContentType = new global::System.Net.Http.Headers.MediaTypeHeaderValue(
request.Filename is null
? "application/octet-stream"
: (global::System.IO.Path.GetExtension(request.Filename) ?? string.Empty).ToLowerInvariant() switch
{
".aac" => "audio/aac",
".flac" => "audio/flac",
".gif" => "image/gif",
".jpeg" => "image/jpeg",
".jpg" => "image/jpeg",
".json" => "application/json",
".m4a" => "audio/mp4",
".mp3" => "audio/mpeg",
".mp4" => "video/mp4",
".mpeg" => "audio/mpeg",
".mpga" => "audio/mpeg",
".oga" => "audio/ogg",
".ogg" => "audio/ogg",
".opus" => "audio/ogg",
".pdf" => "application/pdf",
".png" => "image/png",
".txt" => "text/plain",
".wav" => "audio/wav",
".weba" => "audio/webm",
".webm" => "video/webm",
".webp" => "image/webp",
_ => "application/octet-stream",
});
__httpRequestContent.Add(
content: __contentFile,
name: "\"file\"",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ partial void ProcessGetVideoGenerationTaskResponseContent(
PrepareGetVideoGenerationTaskRequest(
httpClient: HttpClient,
httpRequestMessage: __httpRequest,
taskId: taskId);
taskId: taskId!);

return __httpRequest;
}
Expand Down