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
Copy file name to clipboardExpand all lines: README.md
+35-13Lines changed: 35 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -66,28 +66,50 @@ using (var client = new WebClient()) client.DownloadFile(fileExport.Url, fileExp
66
66
```
67
67
68
68
## Uploading Files
69
+
Uploads to CloudConvert are done via `import/upload` tasks (see the [docs](https://cloudconvert.com/api/v2/import#import-upload-tasks)). This SDK offers a convenient upload method.
69
70
70
-
Uploads to CloudConvert are done via `import/upload` tasks (see the [docs](https://cloudconvert.com/api/v2/import#import-upload-tasks)). This SDK offers a convenient upload method:
71
+
First create the upload job with `CreateJobAsync`:
Then upload the file the file with `UploadAsync`. This can be done two ways:
87
+
88
+
1.**Upload using a Stream**
89
+
The file will be opened and send in chunks to CloudConvert.
90
+
91
+
> **Note**
92
+
> The stream will not be disposed. Make sure to dispose the stream with `stream.Dispose()` or by using the [using-statement](https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/using-statement) as shown in the following example.
93
+
```cs
94
+
stringpath=@"TestFiles/test.pdf";
95
+
stringfileName="test.pdf";
96
+
97
+
using (System.IO.Streamstream=awaitFile.ReadAllBytesAsync(path))
0 commit comments