files.com 1.2.175 → 1.2.176
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/README.md +16 -15
- package/_VERSION +1 -1
- package/lib/Files.js +1 -1
- package/package.json +1 -1
- package/src/Files.js +1 -1
package/README.md
CHANGED
|
@@ -565,17 +565,7 @@ A README is available on the GitHub link.
|
|
|
565
565
|
|
|
566
566
|
## File/Folder Operations
|
|
567
567
|
|
|
568
|
-
###
|
|
569
|
-
|
|
570
|
-
#### List Root Folder
|
|
571
|
-
|
|
572
|
-
```javascript
|
|
573
|
-
import Folder from 'files.com/lib/models/Folder.js';
|
|
574
|
-
|
|
575
|
-
const dirFiles = await Folder.listFor('/');
|
|
576
|
-
```
|
|
577
|
-
|
|
578
|
-
#### Uploading a File
|
|
568
|
+
### Upload
|
|
579
569
|
|
|
580
570
|
```javascript
|
|
581
571
|
import File from 'files.com/lib/models/File.js';
|
|
@@ -584,15 +574,18 @@ import { isBrowser } from 'files.com/lib/utils.js';
|
|
|
584
574
|
// uploading raw file data
|
|
585
575
|
await File.uploadData(destinationFileName, data);
|
|
586
576
|
|
|
577
|
+
// upload readable stream
|
|
578
|
+
await File.uploadStream(destinationFileName, readableStream)
|
|
579
|
+
|
|
587
580
|
// uploading a file on disk (not available in browser)
|
|
588
581
|
if (!isBrowser()) {
|
|
589
582
|
await File.uploadFile(destinationFileName, sourceFilePath);
|
|
590
583
|
}
|
|
591
584
|
```
|
|
592
585
|
|
|
593
|
-
|
|
586
|
+
### Download
|
|
594
587
|
|
|
595
|
-
|
|
588
|
+
#### Get a Downloadable File Object by Path
|
|
596
589
|
|
|
597
590
|
```javascript
|
|
598
591
|
import File from 'files.com/lib/models/File.js';
|
|
@@ -601,7 +594,7 @@ const foundFile = await File.find(remoteFilePath);
|
|
|
601
594
|
const downloadableFile = await foundFile.download();
|
|
602
595
|
```
|
|
603
596
|
|
|
604
|
-
|
|
597
|
+
#### Download a File (not available in browser)
|
|
605
598
|
|
|
606
599
|
```javascript
|
|
607
600
|
import { isBrowser } from 'files.com/lib/utils.js';
|
|
@@ -618,7 +611,15 @@ if (!isBrowser()) {
|
|
|
618
611
|
}
|
|
619
612
|
```
|
|
620
613
|
|
|
621
|
-
|
|
614
|
+
### List
|
|
615
|
+
|
|
616
|
+
```javascript
|
|
617
|
+
import Folder from 'files.com/lib/models/Folder.js';
|
|
618
|
+
|
|
619
|
+
const dirFiles = await Folder.listFor('/');
|
|
620
|
+
```
|
|
621
|
+
|
|
622
|
+
### Comparing Case-Insensitive Files and Paths
|
|
622
623
|
|
|
623
624
|
For related documentation see [Case Sensitivity Documentation](https://www.files.com/docs/files-and-folders/file-system-semantics/case-sensitivity).
|
|
624
625
|
|
package/_VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
1.2.
|
|
1
|
+
1.2.176
|
package/lib/Files.js
CHANGED
|
@@ -11,7 +11,7 @@ var endpointPrefix = '/api/rest/v1';
|
|
|
11
11
|
var apiKey;
|
|
12
12
|
var baseUrl = 'https://app.files.com';
|
|
13
13
|
var sessionId = null;
|
|
14
|
-
var version = '1.2.
|
|
14
|
+
var version = '1.2.176';
|
|
15
15
|
var userAgent = "Files.com JavaScript SDK v".concat(version);
|
|
16
16
|
var logLevel = _Logger.LogLevel.INFO;
|
|
17
17
|
var debugRequest = false;
|
package/package.json
CHANGED
package/src/Files.js
CHANGED