files.com 1.2.204 → 1.2.205
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 +34 -0
- 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
|
@@ -668,6 +668,40 @@ Error
|
|
|
668
668
|
| `SiteConfiguration_TrialLockedError`| `SiteConfigurationError` |
|
|
669
669
|
| `SiteConfiguration_UserRequestsEnabledRequiredError`| `SiteConfigurationError` |
|
|
670
670
|
|
|
671
|
+
## {frontmatter.title}
|
|
672
|
+
|
|
673
|
+
Certain API operations return lists of objects. When the number of objects in the list is large,
|
|
674
|
+
the API will paginate the results.
|
|
675
|
+
|
|
676
|
+
The Files.com JavaScript SDK automatically paginates through lists of objects by default.
|
|
677
|
+
|
|
678
|
+
```javascript title="Example Request" hasDataFormatSelector
|
|
679
|
+
import File from 'files.com/lib/models/File';
|
|
680
|
+
import * as FilesErrors from 'files.com/lib/Errors';
|
|
681
|
+
|
|
682
|
+
Files.configureNetwork({
|
|
683
|
+
// true by default
|
|
684
|
+
autoPaginate: true,
|
|
685
|
+
});
|
|
686
|
+
|
|
687
|
+
try {
|
|
688
|
+
const files = await Folder.listFor(path, {
|
|
689
|
+
search: "some-partial-filename",
|
|
690
|
+
});
|
|
691
|
+
for (const file of files) {
|
|
692
|
+
// Operate on file
|
|
693
|
+
}
|
|
694
|
+
} catch (err) {
|
|
695
|
+
if (err instanceof FilesErrors.NotAuthenticatedError) {
|
|
696
|
+
console.error(`Authentication Error Occurred (${err.constructor.name}): ${err.error}`);
|
|
697
|
+
} else if (err instanceof FilesErrors.FilesError) {
|
|
698
|
+
console.error(`Unknown Error Occurred (${err.constructor.name}): ${err.error}`);
|
|
699
|
+
} else {
|
|
700
|
+
throw err;
|
|
701
|
+
}
|
|
702
|
+
}
|
|
703
|
+
```
|
|
704
|
+
|
|
671
705
|
## Case Sensitivity
|
|
672
706
|
|
|
673
707
|
The Files.com API compares files and paths in a case-insensitive manner.
|
package/_VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
1.2.
|
|
1
|
+
1.2.205
|
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.205';
|
|
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