update README.md
This commit is contained in:
@@ -273,6 +273,8 @@ response = client.GetFieldsByAppId(appId=195, pagingRequest)
|
|||||||
|
|
||||||
#### Get File Info By Id
|
#### Get File Info By Id
|
||||||
|
|
||||||
|
Returns the Onspring file's metadata.
|
||||||
|
|
||||||
```python
|
```python
|
||||||
response = client.GetFileInfoById(recordId=1, fieldId=6990, fileId=274)
|
response = client.GetFileInfoById(recordId=1, fieldId=6990, fileId=274)
|
||||||
|
|
||||||
@@ -288,6 +290,8 @@ print(f'File Href: {response.data.fileInfo.fileHref}')
|
|||||||
|
|
||||||
#### Get File By Id
|
#### Get File By Id
|
||||||
|
|
||||||
|
Returns the file itself.
|
||||||
|
|
||||||
```python
|
```python
|
||||||
response = client.GetFileById(recordId=1, fieldId=6990, fileId=274)
|
response = client.GetFileById(recordId=1, fieldId=6990, fileId=274)
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,17 @@
|
|||||||
|
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',
|
||||||
|
# datetime.now())
|
||||||
|
|
||||||
|
# response = client.SaveFile(request)
|
||||||
|
|
||||||
|
# print(f'Status Code: {response.statusCode}')
|
||||||
|
# print(f'File Id: {response.data.id}')
|
||||||
Reference in New Issue
Block a user