skyflow-js 2.7.6 → 2.7.8

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/README.md CHANGED
@@ -1,5 +1,5 @@
1
1
  # skyflow-js
2
- Skyflows JavaScript SDK can be used to securely collect, tokenize, and reveal sensitive data in the browser without exposing your front-end infrastructure to sensitive data.
2
+ Skyflow's JavaScript SDK can be used to securely collect, tokenize, and reveal sensitive data in the browser without exposing your front-end infrastructure to sensitive data.
3
3
 
4
4
  ---
5
5
 
@@ -2791,7 +2791,8 @@ Note:
2791
2791
  ### File upload limitations:
2792
2792
 
2793
2793
  - Only non-executable file are allowed to be uploaded.
2794
- - Files must have a maximum size of 32 MB
2794
+ - Files have a default maximum size of 32 MB per file. This limit is configurable using the `maxFileSize` option.
2795
+ - Up to 4 files can be uploaded at a time by default. This limit is configurable using the `maxFileCount` option.
2795
2796
  - File columns can't enable tokenization, redaction, or arrays.
2796
2797
  - Re-uploading a file overwrites previously uploaded data.
2797
2798
  - Partial uploads or resuming a previous upload isn't supported.
@@ -2851,10 +2852,19 @@ element.uploadMultipleFiles();
2851
2852
  Along with fileElementInput, you can define other options in the Options object as described below:
2852
2853
  ```js
2853
2854
  const options = {
2854
- allowedFileType: String[], // Optional, indicates the allowed file types for upload
2855
+ allowedFileType: String[], // Optional. Restricts uploads to the listed file extensions (e.g. [".pdf", ".png"]).
2856
+ blockEmptyFiles: Boolean, // Optional. When true, rejects files with 0 bytes. Default: false.
2857
+ preserveFileName: Boolean, // Optional. When true, keeps the original filename on upload. Default: false.
2858
+ maxFileSize: Number, // Optional. Maximum size in bytes for each individual file. Default: 32000000 (32 MB).
2859
+ maxFileCount: Number, // Optional. Maximum number of files that can be selected at once. Must be a positive integer. Default: 4.
2855
2860
  }
2856
2861
  ```
2857
- `allowedFileType`: An array of string value that indicates the allowedFileTypes to be uploaded.
2862
+
2863
+ - `allowedFileType`: An array of strings indicating which file extensions are accepted for upload.
2864
+ - `blockEmptyFiles`: When `true`, files with a size of 0 bytes are rejected.
2865
+ - `preserveFileName`: When `true`, the original filename is preserved on upload.
2866
+ - `maxFileSize`: Maximum allowed size **per file**, in bytes. If any file exceeds this limit, a validation error is shown with the filename. Defaults to `32000000` (32 MB). Only applies to `MULTI_FILE_INPUT` elements.
2867
+ - `maxFileCount`: Maximum number of files that can be selected for a single upload. Must be a positive integer. Defaults to `4`. Only applies to `MULTI_FILE_INPUT` elements.
2858
2868
 
2859
2869
  #### File upload with options example
2860
2870
 
@@ -2889,8 +2899,10 @@ const cardNumberElement = collectContainer.create({
2889
2899
  label: 'Card Number',
2890
2900
  type: Skyflow.ElementType.CARD_NUMBER,
2891
2901
  });
2892
- const options = {
2893
- allowedFileType: [".pdf",".png"];
2902
+ const options = {
2903
+ allowedFileType: [".pdf", ".png"],
2904
+ maxFileSize: 5000000, // 5 MB per file
2905
+ maxFileCount: 3, // up to 3 files at once
2894
2906
  };
2895
2907
  const fileElement = collectContainer.create({
2896
2908
  table: 'newTable',