Upload
Uploads a file encoded using the Base46 scheme to the FintechOS platform server. You can use this in conjunction with the Download API endpoint to transfer files between FintechOS platform servers.
Syntax
Copy
POST <host_address>/api/openApiV2/Upload
Content-Type: application/json
AccessToken: <access_token>
{
"Name":<file_name>,
"Base64Content": <file_content>
}
| Parameter | Description |
|---|---|
host_address
|
URL of the FintechOS platform server. |
access_token
|
Access token used to connect to the API endpoint. For details, see Authentication. |
file_name
|
Name of the file to be uploaded to the FintechOS server. |
file_content
|
Base64 encoded content of the file to be uploaded to the FintechOS server. |
Response
Copy
{
"Name": "test.jpg",
"RealName": "test_45f79dbf-d788-4e65-9b2b-d0abfbd6bcda.jpg",
"IsSuccess": true,
"Message": null,
"ClientScript": null,
"Serialized": null,
"ErrorCode": 0,
"UIResult": null
}
| Parameter | Description |
|---|---|
Name
|
Name of the uploaded file. |
RealName
|
ID of the newly uploaded file. |
IsSuccess
|
Indicates if the upload was successful or not. |
Examples
In this example:
- A user uploads a scanned contract file to the https://FintechOSStudio server.
- The user is identified by the 78596ed1-df3a-4ce0-b49a-60f4aabd0ebe access token (for information on how to obtain the access token, see Authentication).
- The scan is stored in a file called contract.jpg.
- The file content is passed in the Base64Content parameter (encoded in the Base64 scheme).
- The request is successful in uploading a file with the contract_2eebb11c-528e-4816-88fc-97cce3d5a798.jpg identifier (which is returned in the response).
Request
Copy
POST https://FintechOSStudio/api/openApiV2/Upload
Content-Type: application/json
AccessToken: <access_token>
{
"Name": "contract.jpg",
"Base64Content": "zIyI+IDxyZGY6R ................... Oi8vbnMuYWRvYmUuY29tL3hhcC8xLj"
}
Response
Copy
{
"Name": "contract.jpg",
"RealName": "contract_2eebb11c-528e-4816-88fc-97cce3d5a798.jpg",
"IsSuccess": true,
"Message": null,
"ClientScript": null,
"Serialized": null,
"ErrorCode": 0,
"UIResult": null
}