files.com 1.0.241 → 1.0.243
Sign up to get free protection for your applications and to get access to all the features.
package/_VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.0.
|
1
|
+
1.0.243
|
@@ -6,6 +6,7 @@
|
|
6
6
|
{
|
7
7
|
"id": 1,
|
8
8
|
"created_at": 1,
|
9
|
+
"created_at_iso8601": 1,
|
9
10
|
"user_id": 1,
|
10
11
|
"file_id": 1,
|
11
12
|
"parent_id": 1,
|
@@ -32,6 +33,7 @@
|
|
32
33
|
|
33
34
|
* `id` (int64): Action ID
|
34
35
|
* `created_at` (int64): When the action happened
|
36
|
+
* `created_at_iso8601` (int64): When the action happened, in ISO8601 format.
|
35
37
|
* `user_id` (int64): User ID
|
36
38
|
* `file_id` (int64): File ID related to the action
|
37
39
|
* `parent_id` (int64): ID of the parent folder
|
package/lib/models/File.js
CHANGED
@@ -869,7 +869,7 @@ var File = /*#__PURE__*/(0, _createClass2.default)(function File() {
|
|
869
869
|
nextFileUploadPart = _context14.sent;
|
870
870
|
concurrentUploads.push(_Api.default.sendFilePart(nextFileUploadPart.upload_uri, 'PUT', buffer));
|
871
871
|
chunks = [firstChunkForNextPart];
|
872
|
-
length =
|
872
|
+
length = firstChunkForNextPart.length;
|
873
873
|
readableStream.resume();
|
874
874
|
_context14.next = 21;
|
875
875
|
break;
|
@@ -37,6 +37,9 @@ var HistoryExportResult = /*#__PURE__*/(0, _createClass2.default)(function Histo
|
|
37
37
|
(0, _defineProperty2.default)(this, "getCreatedAt", function () {
|
38
38
|
return _this.attributes.created_at;
|
39
39
|
});
|
40
|
+
(0, _defineProperty2.default)(this, "getCreatedAtIso8601", function () {
|
41
|
+
return _this.attributes.created_at_iso8601;
|
42
|
+
});
|
40
43
|
(0, _defineProperty2.default)(this, "getUserId", function () {
|
41
44
|
return _this.attributes.user_id;
|
42
45
|
});
|
package/package.json
CHANGED
package/src/models/File.js
CHANGED
@@ -29,6 +29,9 @@ class HistoryExportResult {
|
|
29
29
|
// int64 # When the action happened
|
30
30
|
getCreatedAt = () => this.attributes.created_at
|
31
31
|
|
32
|
+
// int64 # When the action happened, in ISO8601 format.
|
33
|
+
getCreatedAtIso8601 = () => this.attributes.created_at_iso8601
|
34
|
+
|
32
35
|
// int64 # User ID
|
33
36
|
getUserId = () => this.attributes.user_id
|
34
37
|
|
package/test/src/index.js
CHANGED
@@ -102,6 +102,30 @@ const testSuite = async () => {
|
|
102
102
|
Logger.info('***** testUploadAndDownload() succeeded! *****')
|
103
103
|
}
|
104
104
|
|
105
|
+
/* to run this test, put a file (or symlink) at huge-file.ext * /
|
106
|
+
const testUploadHugeFile = async () => {
|
107
|
+
const sourceFilePath = '../huge-file.ext'
|
108
|
+
|
109
|
+
const displayName = `huge-file__${nonce}.ext`
|
110
|
+
const destinationPath = `${SDK_TEST_ROOT_FOLDER}/${displayName}`
|
111
|
+
|
112
|
+
const file = await File.uploadFile(destinationPath, sourceFilePath)
|
113
|
+
|
114
|
+
assert(!!file.path)
|
115
|
+
assert(file.display_name === displayName)
|
116
|
+
|
117
|
+
const foundFile = await File.find(destinationPath)
|
118
|
+
|
119
|
+
assert(foundFile.path === destinationPath)
|
120
|
+
assert(foundFile.display_name === displayName)
|
121
|
+
assert(typeof foundFile.getDownloadUri() === 'undefined')
|
122
|
+
|
123
|
+
await file.delete()
|
124
|
+
|
125
|
+
Logger.info('***** testUploadHugeFile() succeeded! *****')
|
126
|
+
}
|
127
|
+
/**/
|
128
|
+
|
105
129
|
const testSession = async () => {
|
106
130
|
const username = process.env.FILES_SESSION_USERNAME
|
107
131
|
const password = process.env.FILES_SESSION_PASSWORD
|
@@ -177,6 +201,7 @@ const testSuite = async () => {
|
|
177
201
|
|
178
202
|
await testFolderListAutoPagination()
|
179
203
|
await testUploadAndDownload()
|
204
|
+
// await testUploadHugeFile() // to run this test, put a file (or symlink) at huge-file.ext
|
180
205
|
await testSession()
|
181
206
|
await testFailure()
|
182
207
|
await testUserListAndUpdate()
|