seafile-js 0.2.209 → 0.2.210
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/seafile-api.js +10 -0
- package/package.json +1 -1
package/lib/seafile-api.js
CHANGED
|
@@ -1404,6 +1404,16 @@ var SeafileAPI = /*#__PURE__*/function () {
|
|
|
1404
1404
|
form.append('newname', newfileName);
|
|
1405
1405
|
return this._sendPostRequest(url, form);
|
|
1406
1406
|
}
|
|
1407
|
+
}, {
|
|
1408
|
+
key: "convertFile",
|
|
1409
|
+
value: function convertFile(repoID, filePath, dstType) {
|
|
1410
|
+
var path = encodeURIComponent(filePath);
|
|
1411
|
+
var url = this.server + '/api/v2.1/repos/' + repoID + '/file/?p=' + path;
|
|
1412
|
+
var form = new FormData();
|
|
1413
|
+
form.append('operation', 'convert');
|
|
1414
|
+
form.append('dst_type', dstType);
|
|
1415
|
+
return this._sendPostRequest(url, form);
|
|
1416
|
+
}
|
|
1407
1417
|
}, {
|
|
1408
1418
|
key: "lockfile",
|
|
1409
1419
|
value: function lockfile(repoID, filePath) {
|