update README.md
This commit is contained in:
@@ -308,6 +308,26 @@ print(f'File Location: {filePath}')
|
|||||||
#### Save File
|
#### Save File
|
||||||
|
|
||||||
```python
|
```python
|
||||||
|
from Models import SaveFileRequest
|
||||||
|
import os
|
||||||
|
import mimetypes
|
||||||
|
|
||||||
|
filePath = 'C:\\Users\\sfree\\Documents\\Temp\\Test Attachment.txt'
|
||||||
|
fileName = os.path.basename(filePath)
|
||||||
|
contentType = mimetypes.guess_type(filePath)
|
||||||
|
|
||||||
|
request = SaveFileRequest(
|
||||||
|
60,
|
||||||
|
6989,
|
||||||
|
fileName,
|
||||||
|
filePath,
|
||||||
|
contentType,
|
||||||
|
'Initial revision')
|
||||||
|
|
||||||
|
response = client.SaveFile(request)
|
||||||
|
|
||||||
|
print(f'Status Code: {response.statusCode}')
|
||||||
|
print(f'File Id: {response.data.id}')
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Delete File By Id
|
#### Delete File By Id
|
||||||
|
|||||||
Reference in New Issue
Block a user