diff --git a/skyvault/README.md b/skyvault/README.md index e89d6b4..5ddd9e1 100644 --- a/skyvault/README.md +++ b/skyvault/README.md @@ -2275,7 +2275,7 @@ Skyflow.CollectElementInput( | Value | Meaning | | --- | --- | | `FILE_INPUT` | A single file. The per-file size cap is fixed at 32 MB by the server. | -| `MULTI_FILE_INPUT` | Multiple files, up to `maxFileCount` (default 4), each up to `maxFileSize`. | +| `MULTI_FILE_INPUT` | Multiple files, up to `maxFileCount` (default 4), each up to `maxFileSize` (default 32 MB). | **Layout.** There is one native layout — a trigger button that opens the picker, the selected files listed below with a per-file remove (✕), and an error line. A single element replaces its one file; a multi element appends up to its max. Style the trigger with `inputStyles`, the label with `labelStyles` and the error line with `errorTextStyles`, as on a text field. Apps that want their own trigger call `openPicker()` (see Step 3). @@ -2306,7 +2306,7 @@ Skyflow.CollectElementOptions( blockEmptyFiles: Boolean, // reject a 0-byte file (default false) preserveFileName: Boolean, // true (default) keeps the original name (rejected if it has characters outside A-Za-z0-9 ! - _ . * ( )); false sends a generated UUID name (keeps PII in the name out of the vault) returnFileMetadata: Boolean, // ask the server to return fileName / fileSize / fileType on success (default false) - maxFileSize: Long, // per-file byte cap — MULTI_FILE_INPUT only (single is fixed at 32 MB) + maxFileSize: Long, // per-file byte cap — MULTI_FILE_INPUT only (default 32 MB; single is fixed at 32 MB) maxFileCount: Int, // max files for one MULTI_FILE_INPUT upload (default 4) sources: Array // which pickers to offer (default [FILES, PHOTOS]) ) @@ -2316,6 +2316,8 @@ With `preserveFileName = true` (the default) the original name is uploaded, so i `allowedFileType` accepts file extensions (`".pdf"`), exact MIME types (`"application/pdf"`) and MIME wildcards (`"image/*"`), matched case-insensitively. Extension entries match the file's extension; MIME and wildcard entries match its resolved content type. +The SDK always rejects `.zip`, `.exe`, `.rar`, `.deb`, and `.apk` files, even when `allowedFileType` lists them or is `null`. + **`sources` — `Skyflow.FileSource`** When more than one source is enabled the element shows a source chooser; with one source the picker opens directly. None of these require a runtime storage permission. @@ -2400,6 +2402,16 @@ The response keeps the **input order** of the files. Outcomes: | Every file failed | `onFailure` | `{ "errorResponse": [ ... ] }` | | Some succeeded, some failed | `onFailure` | `{ "fileUploadResponse": [ ... ], "errorResponse": [ ... ] }` | +Each success entry carries the `skyflow_id` of the record the file was uploaded to. With `returnFileMetadata = true`, it also carries the `fileMetadata` object the server returns: + +```json +{ + "fileUploadResponse": [ + { "skyflow_id": "", "fileMetadata": { ... } } + ] +} +``` + Each error entry carries its `fileName`, `code` and `description`. ### End to end example of collecting files with Skyflow Elements