@sparkvault/sdk-mobile 6.0.0 → 6.0.1
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/dist/types.d.ts +19 -7
- package/package.json +1 -1
- package/src/types.ts +19 -7
package/dist/types.d.ts
CHANGED
|
@@ -708,13 +708,25 @@ export interface UploadTransferPolicy {
|
|
|
708
708
|
*/
|
|
709
709
|
export type UploadAbortBehavior = 'terminate' | 'keep';
|
|
710
710
|
/**
|
|
711
|
-
* App-provided adapter that PATCHes a whole local file as the request body
|
|
712
|
-
*
|
|
713
|
-
*
|
|
714
|
-
*
|
|
715
|
-
*
|
|
716
|
-
*
|
|
717
|
-
*
|
|
711
|
+
* App-provided adapter that PATCHes a whole local file as the request body.
|
|
712
|
+
* The fallback behind `backgroundTransfer`: the tus uploader reaches for it
|
|
713
|
+
* only when no OS transfer engine is configured and the file fits one chunk;
|
|
714
|
+
* everything else keeps the streaming XHR path.
|
|
715
|
+
*
|
|
716
|
+
* The SDK does not ask for an OS background session here, and a host should
|
|
717
|
+
* think twice before backing this with one. A background session hands the
|
|
718
|
+
* body's path to a system daemon that opens the file in its own process,
|
|
719
|
+
* outside whatever sandbox extensions the app holds; a file the app can read
|
|
720
|
+
* is not necessarily one the daemon can. Where `fileUri` may point outside
|
|
721
|
+
* the app's container - a photo library original, a document-picker result -
|
|
722
|
+
* a background session fails at open() before a byte moves, and reports it
|
|
723
|
+
* as a transport error indistinguishable from a dead connection. A host that
|
|
724
|
+
* wants suspension-survival should stage the body into its own container
|
|
725
|
+
* first, the way the OS transfer engine does, or supply
|
|
726
|
+
* `backgroundTransfer` instead. Note that opting out can take an explicit
|
|
727
|
+
* flag: expo-file-system's `uploadAsync` writes `sessionType: BACKGROUND`
|
|
728
|
+
* into its options before spreading the caller's, so omitting the key selects
|
|
729
|
+
* a background session rather than declining one.
|
|
718
730
|
*/
|
|
719
731
|
export interface MobileBackgroundUploader {
|
|
720
732
|
uploadFile(url: string, fileUri: string, options: {
|
package/package.json
CHANGED
package/src/types.ts
CHANGED
|
@@ -811,13 +811,25 @@ export interface UploadTransferPolicy {
|
|
|
811
811
|
export type UploadAbortBehavior = 'terminate' | 'keep';
|
|
812
812
|
|
|
813
813
|
/**
|
|
814
|
-
* App-provided adapter that PATCHes a whole local file as the request body
|
|
815
|
-
*
|
|
816
|
-
*
|
|
817
|
-
*
|
|
818
|
-
*
|
|
819
|
-
*
|
|
820
|
-
*
|
|
814
|
+
* App-provided adapter that PATCHes a whole local file as the request body.
|
|
815
|
+
* The fallback behind `backgroundTransfer`: the tus uploader reaches for it
|
|
816
|
+
* only when no OS transfer engine is configured and the file fits one chunk;
|
|
817
|
+
* everything else keeps the streaming XHR path.
|
|
818
|
+
*
|
|
819
|
+
* The SDK does not ask for an OS background session here, and a host should
|
|
820
|
+
* think twice before backing this with one. A background session hands the
|
|
821
|
+
* body's path to a system daemon that opens the file in its own process,
|
|
822
|
+
* outside whatever sandbox extensions the app holds; a file the app can read
|
|
823
|
+
* is not necessarily one the daemon can. Where `fileUri` may point outside
|
|
824
|
+
* the app's container - a photo library original, a document-picker result -
|
|
825
|
+
* a background session fails at open() before a byte moves, and reports it
|
|
826
|
+
* as a transport error indistinguishable from a dead connection. A host that
|
|
827
|
+
* wants suspension-survival should stage the body into its own container
|
|
828
|
+
* first, the way the OS transfer engine does, or supply
|
|
829
|
+
* `backgroundTransfer` instead. Note that opting out can take an explicit
|
|
830
|
+
* flag: expo-file-system's `uploadAsync` writes `sessionType: BACKGROUND`
|
|
831
|
+
* into its options before spreading the caller's, so omitting the key selects
|
|
832
|
+
* a background session rather than declining one.
|
|
821
833
|
*/
|
|
822
834
|
export interface MobileBackgroundUploader {
|
|
823
835
|
uploadFile(
|