|
| 1 | +# Asposehtmlcloud.FileApi |
| 2 | + |
| 3 | +All URIs are relative to *https://api.aspose.cloud/v1.1* |
| 4 | + |
| 5 | +Method | HTTP request | Description |
| 6 | +------------- | ------------- | ------------- |
| 7 | +[**deleteFile**](FileApi.md#deleteFile) | **DELETE** /storage/file | Remove a specific file |
| 8 | +[**getDownload**](FileApi.md#getDownload) | **GET** /storage/file | Download a specific file |
| 9 | +[**postMoveFile**](FileApi.md#postMoveFile) | **POST** /storage/file | Move a specific file |
| 10 | +[**putCreate**](FileApi.md#putCreate) | **PUT** /storage/file | Upload a specific file |
| 11 | + |
| 12 | + |
| 13 | +<a name="deleteFile"></a> |
| 14 | +# **deleteFile** |
| 15 | +> RemoveFileResponse deleteFile(path, opts) |
| 16 | +
|
| 17 | +Remove a specific file |
| 18 | + |
| 19 | +### Example |
| 20 | +```javascript |
| 21 | +var Asposehtmlcloud = require('asposehtmlcloud'); |
| 22 | + |
| 23 | +var apiInstance = new Asposehtmlcloud.FileApi(); |
| 24 | + |
| 25 | +var path = "path_example"; // String | Path of the file including file name and extension e.g. /Folder1/file.ext |
| 26 | + |
| 27 | +var opts = { |
| 28 | + 'versionId': "versionId_example", // String | File's version |
| 29 | + 'storage': "storage_example" // String | User's storage name |
| 30 | +}; |
| 31 | + |
| 32 | +var callback = function(error, data, response) { |
| 33 | + if (error) { |
| 34 | + console.error(error); |
| 35 | + } else { |
| 36 | + console.log('API called successfully. Returned data: ' + data); |
| 37 | + } |
| 38 | +}; |
| 39 | +apiInstance.deleteFile(path, opts, callback); |
| 40 | +``` |
| 41 | + |
| 42 | +### Parameters |
| 43 | + |
| 44 | +Name | Type | Description | Notes |
| 45 | +------------- | ------------- | ------------- | ------------- |
| 46 | + **path** | **String**| Path of the file including file name and extension e.g. /Folder1/file.ext | |
| 47 | + **versionId** | **String**| File's version | [optional] |
| 48 | + **storage** | **String**| User's storage name | [optional] |
| 49 | + |
| 50 | +### Return type |
| 51 | + |
| 52 | +[**RemoveFileResponse**](RemoveFileResponse.md) |
| 53 | + |
| 54 | +### HTTP request headers |
| 55 | + |
| 56 | + - **Content-Type**: application/json |
| 57 | + - **Accept**: application/json |
| 58 | + |
| 59 | +<a name="getDownload"></a> |
| 60 | +# **getDownload** |
| 61 | +> File getDownload(path, opts) |
| 62 | +
|
| 63 | +Download a specific file |
| 64 | + |
| 65 | +### Example |
| 66 | +```javascript |
| 67 | +var Asposehtmlcloud = require('asposehtmlcloud'); |
| 68 | + |
| 69 | +var apiInstance = new Asposehtmlcloud.FileApi(); |
| 70 | + |
| 71 | +var path = "path_example"; // String | Path of the file including the file name and extension e.g. /file.ext |
| 72 | + |
| 73 | +var opts = { |
| 74 | + 'versionId': "versionId_example", // String | File's version |
| 75 | + 'storage': "storage_example" // String | User's storage name |
| 76 | +}; |
| 77 | + |
| 78 | +var callback = function(error, data, response) { |
| 79 | + if (error) { |
| 80 | + console.error(error); |
| 81 | + } else { |
| 82 | + console.log('API called successfully. Returned data: ' + data); |
| 83 | + } |
| 84 | +}; |
| 85 | +apiInstance.getDownload(path, opts, callback); |
| 86 | +``` |
| 87 | + |
| 88 | +### Parameters |
| 89 | + |
| 90 | +Name | Type | Description | Notes |
| 91 | +------------- | ------------- | ------------- | ------------- |
| 92 | + **path** | **String**| Path of the file including the file name and extension e.g. /file.ext | |
| 93 | + **versionId** | **String**| File's version | [optional] |
| 94 | + **storage** | **String**| User's storage name | [optional] |
| 95 | + |
| 96 | +### Return type |
| 97 | + |
| 98 | +**Blob** See test in [../test/StorageApi.spec.js](../test/StorageApi.spec.js) |
| 99 | + |
| 100 | +### HTTP request headers |
| 101 | + |
| 102 | + - **Content-Type**: application/json |
| 103 | + - **Accept**: multipart/form-data |
| 104 | + |
| 105 | +<a name="postMoveFile"></a> |
| 106 | +# **postMoveFile** |
| 107 | +> MoveFileResponse postMoveFile(src, dest, opts) |
| 108 | +
|
| 109 | +Move a specific file |
| 110 | + |
| 111 | +### Example |
| 112 | +```javascript |
| 113 | +var Asposehtmlcloud = require('asposehtmlcloud'); |
| 114 | + |
| 115 | +var apiInstance = new Asposehtmlcloud.FileApi(); |
| 116 | + |
| 117 | +var src = "src_example"; // String | Source file path e.g. /fileSource.ext |
| 118 | + |
| 119 | +var dest = "dest_example"; // String | Destination file path e.g. /fileDestination.ext |
| 120 | + |
| 121 | +var opts = { |
| 122 | + 'versionId': "versionId_example", // String | Source file's version, |
| 123 | + 'storage': "storage_example", // String | User's source storage name |
| 124 | + 'destStorage': "destStorage_example" // String | User's destination storage name |
| 125 | +}; |
| 126 | + |
| 127 | +var callback = function(error, data, response) { |
| 128 | + if (error) { |
| 129 | + console.error(error); |
| 130 | + } else { |
| 131 | + console.log('API called successfully. Returned data: ' + data); |
| 132 | + } |
| 133 | +}; |
| 134 | +apiInstance.postMoveFile(src, dest, opts, callback); |
| 135 | +``` |
| 136 | + |
| 137 | +### Parameters |
| 138 | + |
| 139 | +Name | Type | Description | Notes |
| 140 | +------------- | ------------- | ------------- | ------------- |
| 141 | + **src** | **String**| Source file path e.g. /fileSource.ext | |
| 142 | + **dest** | **String**| Destination file path e.g. /fileDestination.ext | |
| 143 | + **versionId** | **String**| Source file's version, | [optional] |
| 144 | + **storage** | **String**| User's source storage name | [optional] |
| 145 | + **destStorage** | **String**| User's destination storage name | [optional] |
| 146 | + |
| 147 | +### Return type |
| 148 | + |
| 149 | +[**MoveFileResponse**](MoveFileResponse.md) |
| 150 | + |
| 151 | +### HTTP request headers |
| 152 | + |
| 153 | + - **Content-Type**: multipart/form-data |
| 154 | + - **Accept**: application/json |
| 155 | + |
| 156 | +<a name="putCreate"></a> |
| 157 | +# **putCreate** |
| 158 | +> File putCreate(path, file, opts) |
| 159 | +
|
| 160 | +Upload a specific file |
| 161 | + |
| 162 | +### Example |
| 163 | +```javascript |
| 164 | +var Asposehtmlcloud = require('asposehtmlcloud'); |
| 165 | + |
| 166 | +var apiInstance = new Asposehtmlcloud.FileApi(); |
| 167 | + |
| 168 | +var path = "path_example"; // String | Path where to upload including filename and extension e.g. /file.ext or /Folder 1/file.ext |
| 169 | + |
| 170 | +var file = "/path/to/file.txt"; // File | File to upload |
| 171 | + |
| 172 | +var opts = { |
| 173 | + 'versionId': "versionId_example", // String | Source file's version |
| 174 | + 'storage': "storage_example" // String | User's storage name |
| 175 | +}; |
| 176 | + |
| 177 | +var callback = function(error, data, response) { |
| 178 | + if (error) { |
| 179 | + console.error(error); |
| 180 | + } else { |
| 181 | + console.log('API called successfully. Returned data: ' + data); |
| 182 | + } |
| 183 | +}; |
| 184 | +apiInstance.putCreate(path, file, opts, callback); |
| 185 | +``` |
| 186 | + |
| 187 | +### Parameters |
| 188 | + |
| 189 | +Name | Type | Description | Notes |
| 190 | +------------- | ------------- | ------------- | ------------- |
| 191 | + **path** | **String**| Path where to upload including filename and extension e.g. /file.ext or /Folder 1/file.ext | |
| 192 | + **file** | **String**| Upload file path| |
| 193 | + **versionId** | **String**| Source file's version | [optional] |
| 194 | + **storage** | **String**| User's storage name | [optional] |
| 195 | + |
| 196 | +### Return type |
| 197 | + |
| 198 | +[**MessageResponse**](MessageResponse.md) |
| 199 | + |
| 200 | +### HTTP request headers |
| 201 | + |
| 202 | + - **Content-Type**: multipart/form-data |
| 203 | + - **Accept**: application/json |
| 204 | + |
0 commit comments