Skip to content

Commit 442a089

Browse files
authored
📦 v3.0.1
- 🔧 Fix FileObject data in upload events via `http` transport - 📔 Harden documentation
2 parents a00c648 + 0fed32a commit 442a089

6 files changed

Lines changed: 27 additions & 4 deletions

File tree

.versions

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ fetch@0.1.6
2323
geojson-utils@1.0.12
2424
id-map@1.2.0
2525
inter-process-messaging@0.1.2
26-
local-test:ostrio:files@3.0.0
26+
local-test:ostrio:files@3.0.1
2727
logging@1.3.6
2828
meteor@2.1.1
2929
meteortesting:browser-tests@1.8.0
@@ -40,7 +40,7 @@ mongo-id@1.0.9
4040
npm-mongo@6.16.1
4141
ordered-dict@1.2.0
4242
ostrio:cookies@2.9.1
43-
ostrio:files@3.0.0
43+
ostrio:files@3.0.1
4444
promise@1.0.0
4545
random@1.2.2
4646
react-fast-refresh@0.2.9

docs/insert.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -337,6 +337,15 @@ Upload file to a Server via DDP or HTTP.
337337
All data must be in `data URI` scheme (*Base64*)
338338
</td>
339339
</tr>
340+
<tr>
341+
<td align="right">
342+
`remainingTime` {*ReactiveVar*}
343+
</td>
344+
<td>
345+
Remaining upload time in human-readable format <strong>hh:mm:ss</strong>
346+
</td>
347+
<td></td>
348+
</tr>
340349
<tr>
341350
<td align="right">
342351
`estimateTime` {*ReactiveVar*}

docs/insertAsync.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -346,6 +346,15 @@ Configure upload behavior and adjust its settings via *InsertOptions*
346346
All data must be in `data URI` scheme (*Base64*)
347347
</td>
348348
</tr>
349+
<tr>
350+
<td align="right">
351+
`remainingTime` {*ReactiveVar*}
352+
</td>
353+
<td>
354+
Remaining upload time in human-readable format <strong>hh:mm:ss</strong>
355+
</td>
356+
<td></td>
357+
</tr>
349358
<tr>
350359
<td align="right">
351360
`estimateTime` {*ReactiveVar*}

docs/mirgation-to-v3.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ __FilesCursor__:
4141
__FileUpload__:
4242

4343
- ⚠️ `FileUpload#start()` is now *async*!
44+
- ✨ New `FileUpload#remainingTime` {*ReactiveVar*} with upload remaining time in human-readable format
4445

4546
__Callbacks and hooks__:
4647

@@ -64,6 +65,10 @@ __FilesCollection__:
6465
- ✨ Server: `FilesCollection#writeAsync()`
6566
- ✨ Server: `FilesCollection#loadAsync()`
6667

68+
__FileUpload__:
69+
70+
- ✨ New `FileUpload#remainingTime` {*ReactiveVar*} with upload remaining time in human-readable format
71+
6772
__FileCursor__:
6873

6974
- ✨ Anywhere: `FileCursor#removeAsync()`

package.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package.describe({
22
name: 'ostrio:files',
3-
version: '3.0.0',
3+
version: '3.0.1',
44
summary: 'Upload files to a server or 3rd party storage: AWS:S3, GridFS, DropBox, and other',
55
git: 'https://github.com/veliovgroup/Meteor-Files',
66
documentation: 'README.md'

upload.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -574,7 +574,7 @@ export class UploadInstance extends EventEmitter {
574574
delete this.fetchTimeouts[uid];
575575
result = response;
576576

577-
if (response.headers.get('content-type') === 'application/json') {
577+
if ((response.headers.get('content-type') || '').includes('application/json')) {
578578
try {
579579
const jsonData = await response.json();
580580
if (jsonData.meta) {

0 commit comments

Comments
 (0)