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.
Files changed (2) hide show
  1. package/lib/seafile-api.js +10 -0
  2. package/package.json +1 -1
@@ -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) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "seafile-js",
3
- "version": "0.2.209",
3
+ "version": "0.2.210",
4
4
  "private": false,
5
5
  "main": "lib/seafile-api.js",
6
6
  "dependencies": {