@@ -21,8 +21,8 @@ A `BaseClient` deals with three types of data: folders, objects and files.
21
21
* [ getObject] ( BaseClient.md#getobject ) and [ storeObject] ( BaseClient.md#storeobject ) operate on JSON objects. Each object
22
22
has a type.
23
23
24
- * [ getFile] ( BaseClient.md#getfile ) and [ storeFile] ( BaseClient.md#storefile ) operates on files. Each file has a MIME
25
- type.
24
+ * [ getFile] ( BaseClient.md#getfile ) and [ storeFile] ( BaseClient.md#storefile ) operates on files. Each file has a
25
+ content/MIME type.
26
26
27
27
* [ getAll] ( BaseClient.md#getall ) returns all objects or files for the given folder path.
28
28
@@ -223,7 +223,7 @@ corresponding `publicClient` it is `/public/<moduleName>/`.
223
223
224
224
#### Defined in
225
225
226
- [ baseclient.ts:239] ( https://github.com/remotestorage/remotestorage.js/blob/a199c15fb409a17fd444aa7fba846e7fecc5981d /src/baseclient.ts#L239 )
226
+ [ baseclient.ts:239] ( https://github.com/remotestorage/remotestorage.js/blob/a883b85da66e86fad01e632f66b390973ef0772e /src/baseclient.ts#L239 )
227
227
228
228
## Methods
229
229
@@ -247,7 +247,7 @@ Usually called via [`on()`](#on)
247
247
248
248
#### Defined in
249
249
250
- [ eventhandling.ts:29] ( https://github.com/remotestorage/remotestorage.js/blob/a199c15fb409a17fd444aa7fba846e7fecc5981d /src/eventhandling.ts#L29 )
250
+ [ eventhandling.ts:29] ( https://github.com/remotestorage/remotestorage.js/blob/a883b85da66e86fad01e632f66b390973ef0772e /src/eventhandling.ts#L29 )
251
251
252
252
***
253
253
@@ -286,7 +286,7 @@ client.cache('lists/', 'SEEN');
286
286
287
287
#### Defined in
288
288
289
- [ baseclient.ts:683 ] ( https://github.com/remotestorage/remotestorage.js/blob/a199c15fb409a17fd444aa7fba846e7fecc5981d /src/baseclient.ts#L683 )
289
+ [ baseclient.ts:684 ] ( https://github.com/remotestorage/remotestorage.js/blob/a883b85da66e86fad01e632f66b390973ef0772e /src/baseclient.ts#L684 )
290
290
291
291
***
292
292
@@ -344,7 +344,7 @@ client.declareType('todo-item', {
344
344
345
345
#### Defined in
346
346
347
- [ baseclient.ts:733 ] ( https://github.com/remotestorage/remotestorage.js/blob/a199c15fb409a17fd444aa7fba846e7fecc5981d /src/baseclient.ts#L733 )
347
+ [ baseclient.ts:734 ] ( https://github.com/remotestorage/remotestorage.js/blob/a883b85da66e86fad01e632f66b390973ef0772e /src/baseclient.ts#L734 )
348
348
349
349
***
350
350
@@ -420,7 +420,7 @@ Example response:
420
420
421
421
#### Defined in
422
422
423
- [ baseclient.ts:395] ( https://github.com/remotestorage/remotestorage.js/blob/a199c15fb409a17fd444aa7fba846e7fecc5981d /src/baseclient.ts#L395 )
423
+ [ baseclient.ts:395] ( https://github.com/remotestorage/remotestorage.js/blob/a883b85da66e86fad01e632f66b390973ef0772e /src/baseclient.ts#L395 )
424
424
425
425
***
426
426
@@ -449,8 +449,10 @@ Relative path from the module root (without leading slash).
449
449
450
450
An object containing the content type as well as the file's content:
451
451
452
- * ` mimeType ` <br >
453
- String representing the MIME Type of the document.
452
+ * ` contentType ` <br >
453
+ String containing the MIME Type of the document. (Usually just the
454
+ MIME type, but can theoretically contain extra metadata such as ` charset `
455
+ for example.)
454
456
* ` data ` <br >
455
457
Raw data of the document (either a string or an ArrayBuffer)
456
458
@@ -460,15 +462,15 @@ Displaying an image:
460
462
461
463
``` js
462
464
client .getFile (' path/to/some/image' ).then (file => {
463
- const blob = new Blob ([file .data ], { type: file .mimeType });
465
+ const blob = new Blob ([file .data ], { type: file .contentType });
464
466
const targetElement = document .findElementById (' my-image-element' );
465
467
targetElement .src = window .URL .createObjectURL (blob);
466
468
});
467
469
```
468
470
469
471
#### Defined in
470
472
471
- [ baseclient.ts:456 ] ( https://github.com/remotestorage/remotestorage.js/blob/a199c15fb409a17fd444aa7fba846e7fecc5981d /src/baseclient.ts#L456 )
473
+ [ baseclient.ts:457 ] ( https://github.com/remotestorage/remotestorage.js/blob/a883b85da66e86fad01e632f66b390973ef0772e /src/baseclient.ts#L457 )
472
474
473
475
***
474
476
@@ -499,7 +501,7 @@ The full URL of the item, including the storage origin, or `undefined`
499
501
500
502
#### Defined in
501
503
502
- [ baseclient.ts:655 ] ( https://github.com/remotestorage/remotestorage.js/blob/a199c15fb409a17fd444aa7fba846e7fecc5981d /src/baseclient.ts#L655 )
504
+ [ baseclient.ts:656 ] ( https://github.com/remotestorage/remotestorage.js/blob/a883b85da66e86fad01e632f66b390973ef0772e /src/baseclient.ts#L656 )
503
505
504
506
***
505
507
@@ -569,7 +571,7 @@ Example of a listing object:
569
571
570
572
#### Defined in
571
573
572
- [ baseclient.ts:326] ( https://github.com/remotestorage/remotestorage.js/blob/a199c15fb409a17fd444aa7fba846e7fecc5981d /src/baseclient.ts#L326 )
574
+ [ baseclient.ts:326] ( https://github.com/remotestorage/remotestorage.js/blob/a883b85da66e86fad01e632f66b390973ef0772e /src/baseclient.ts#L326 )
573
575
574
576
***
575
577
@@ -605,7 +607,7 @@ client.getObject('/path/to/object').then(obj => console.log(obj));
605
607
606
608
#### Defined in
607
609
608
- [ baseclient.ts:540 ] ( https://github.com/remotestorage/remotestorage.js/blob/a199c15fb409a17fd444aa7fba846e7fecc5981d /src/baseclient.ts#L540 )
610
+ [ baseclient.ts:541 ] ( https://github.com/remotestorage/remotestorage.js/blob/a883b85da66e86fad01e632f66b390973ef0772e /src/baseclient.ts#L541 )
609
611
610
612
***
611
613
@@ -641,7 +643,7 @@ remoteStorage.on('connected', function() {
641
643
642
644
#### Defined in
643
645
644
- [ eventhandling.ts:55] ( https://github.com/remotestorage/remotestorage.js/blob/a199c15fb409a17fd444aa7fba846e7fecc5981d /src/eventhandling.ts#L55 )
646
+ [ eventhandling.ts:55] ( https://github.com/remotestorage/remotestorage.js/blob/a883b85da66e86fad01e632f66b390973ef0772e /src/eventhandling.ts#L55 )
645
647
646
648
***
647
649
@@ -669,7 +671,7 @@ client.remove('path/to/object').then(() => console.log('item deleted'));
669
671
670
672
#### Defined in
671
673
672
- [ baseclient.ts:629 ] ( https://github.com/remotestorage/remotestorage.js/blob/a199c15fb409a17fd444aa7fba846e7fecc5981d /src/baseclient.ts#L629 )
674
+ [ baseclient.ts:630 ] ( https://github.com/remotestorage/remotestorage.js/blob/a883b85da66e86fad01e632f66b390973ef0772e /src/baseclient.ts#L630 )
673
675
674
676
***
675
677
@@ -691,7 +693,7 @@ Remove a previously installed event handler
691
693
692
694
#### Defined in
693
695
694
- [ eventhandling.ts:62] ( https://github.com/remotestorage/remotestorage.js/blob/a199c15fb409a17fd444aa7fba846e7fecc5981d /src/eventhandling.ts#L62 )
696
+ [ eventhandling.ts:62] ( https://github.com/remotestorage/remotestorage.js/blob/a883b85da66e86fad01e632f66b390973ef0772e /src/eventhandling.ts#L62 )
695
697
696
698
***
697
699
@@ -716,21 +718,21 @@ A new `BaseClient` operating on a subpath of the current base path
716
718
717
719
#### Defined in
718
720
719
- [ baseclient.ts:272] ( https://github.com/remotestorage/remotestorage.js/blob/a199c15fb409a17fd444aa7fba846e7fecc5981d /src/baseclient.ts#L272 )
721
+ [ baseclient.ts:272] ( https://github.com/remotestorage/remotestorage.js/blob/a883b85da66e86fad01e632f66b390973ef0772e /src/baseclient.ts#L272 )
720
722
721
723
***
722
724
723
725
### storeFile()
724
726
725
- > ** storeFile** (` mimeType ` , ` path ` , ` body ` ): ` Promise ` \< ` string ` \>
727
+ > ** storeFile** (` contentType ` , ` path ` , ` body ` ): ` Promise ` \< ` string ` \>
726
728
727
729
Store raw data at a given path.
728
730
729
731
#### Parameters
730
732
731
- • ** mimeType ** : ` string `
733
+ • ** contentType ** : ` string `
732
734
733
- MIME media type of the data being stored
735
+ Content type ( MIME media type) of the data being stored
734
736
735
737
• ** path** : ` string `
736
738
@@ -772,7 +774,7 @@ fileReader.readAsArrayBuffer(file);
772
774
773
775
#### Defined in
774
776
775
- [ baseclient.ts:502 ] ( https://github.com/remotestorage/remotestorage.js/blob/a199c15fb409a17fd444aa7fba846e7fecc5981d /src/baseclient.ts#L502 )
777
+ [ baseclient.ts:503 ] ( https://github.com/remotestorage/remotestorage.js/blob/a883b85da66e86fad01e632f66b390973ef0772e /src/baseclient.ts#L503 )
776
778
777
779
***
778
780
@@ -825,7 +827,7 @@ client.storeObject('bookmark', path, bookmark)
825
827
826
828
#### Defined in
827
829
828
- [ baseclient.ts:588 ] ( https://github.com/remotestorage/remotestorage.js/blob/a199c15fb409a17fd444aa7fba846e7fecc5981d /src/baseclient.ts#L588 )
830
+ [ baseclient.ts:589 ] ( https://github.com/remotestorage/remotestorage.js/blob/a883b85da66e86fad01e632f66b390973ef0772e /src/baseclient.ts#L589 )
829
831
830
832
***
831
833
@@ -862,4 +864,4 @@ var result = client.validate(document);
862
864
863
865
#### Defined in
864
866
865
- [ baseclient.ts:765 ] ( https://github.com/remotestorage/remotestorage.js/blob/a199c15fb409a17fd444aa7fba846e7fecc5981d /src/baseclient.ts#L765 )
867
+ [ baseclient.ts:766 ] ( https://github.com/remotestorage/remotestorage.js/blob/a883b85da66e86fad01e632f66b390973ef0772e /src/baseclient.ts#L766 )
0 commit comments