Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

filepond-plugin-file-validate-size

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

filepond-plugin-file-validate-size - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

4

dist/filepond-plugin-file-validate-size.esm.js
/*
* FilePondPluginFileValidateSize 1.0.2
* FilePondPluginFileValidateSize 1.0.3
* Licensed under MIT, https://opensource.org/licenses/MIT

@@ -103,3 +103,3 @@ * Please visit https://pqina.nl/filepond for details.

if (document) {
if (typeof navigator !== 'undefined' && document) {
// plugin has loaded

@@ -106,0 +106,0 @@ document.dispatchEvent(

/*
* FilePondPluginFileValidateSize 1.0.2
* FilePondPluginFileValidateSize 1.0.3
* Licensed under MIT, https://opensource.org/licenses/MIT
* Please visit https://pqina.nl/filepond for details.
*/
var plugin$1=({addFilter:e,utils:i})=>{const{Type:l,replaceInString:E,toNaturalFileSize:_}=i;return e("ALLOW_HOPPER_ITEM",(e,{query:i})=>{if(!i("GET_ALLOW_FILE_SIZE_VALIDATION"))return!0;const l=i("GET_MAX_FILE_SIZE");return!(null!==l&&e.size>l)}),e("LOAD_FILE",(e,{query:i})=>new Promise((l,t)=>{if(!i("GET_ALLOW_FILE_SIZE_VALIDATION"))return void l(e);const a=i("GET_MAX_FILE_SIZE");if(null!==a&&e.size>a)return void t({status:{main:i("GET_LABEL_MAX_FILE_SIZE_EXCEEDED"),sub:E(i("GET_LABEL_MAX_FILE_SIZE"),{filesize:_(a)})}});const n=i("GET_MAX_TOTAL_FILE_SIZE");if(null!==n){if(i("GET_ITEMS").reduce((e,i)=>e+i.fileSize,0)+e.size>n)return void t({status:{main:i("GET_LABEL_MAX_TOTAL_FILE_SIZE_EXCEEDED"),sub:E(i("GET_LABEL_MAX_TOTAL_FILE_SIZE"),{filesize:_(n)})}})}l(e)})),{options:{allowFileSizeValidation:[!0,l.BOOLEAN],maxFileSize:[null,l.INT],maxTotalFileSize:[null,l.INT],labelMaxFileSizeExceeded:["File is too large",l.STRING],labelMaxFileSize:["Maximum file size is {filesize}",l.STRING],labelMaxTotalFileSizeExceeded:["Maximum total size exceeded",l.STRING],labelMaxTotalFileSize:["Maximum total file size is {filesize}",l.STRING]}}};document&&document.dispatchEvent(new CustomEvent("FilePond:pluginloaded",{detail:plugin$1}));export default plugin$1;
var plugin$1=({addFilter:e,utils:i})=>{const{Type:l,replaceInString:E,toNaturalFileSize:_}=i;return e("ALLOW_HOPPER_ITEM",(e,{query:i})=>{if(!i("GET_ALLOW_FILE_SIZE_VALIDATION"))return!0;const l=i("GET_MAX_FILE_SIZE");return!(null!==l&&e.size>l)}),e("LOAD_FILE",(e,{query:i})=>new Promise((l,t)=>{if(!i("GET_ALLOW_FILE_SIZE_VALIDATION"))return void l(e);const a=i("GET_MAX_FILE_SIZE");if(null!==a&&e.size>a)return void t({status:{main:i("GET_LABEL_MAX_FILE_SIZE_EXCEEDED"),sub:E(i("GET_LABEL_MAX_FILE_SIZE"),{filesize:_(a)})}});const n=i("GET_MAX_TOTAL_FILE_SIZE");if(null!==n){if(i("GET_ITEMS").reduce((e,i)=>e+i.fileSize,0)+e.size>n)return void t({status:{main:i("GET_LABEL_MAX_TOTAL_FILE_SIZE_EXCEEDED"),sub:E(i("GET_LABEL_MAX_TOTAL_FILE_SIZE"),{filesize:_(n)})}})}l(e)})),{options:{allowFileSizeValidation:[!0,l.BOOLEAN],maxFileSize:[null,l.INT],maxTotalFileSize:[null,l.INT],labelMaxFileSizeExceeded:["File is too large",l.STRING],labelMaxFileSize:["Maximum file size is {filesize}",l.STRING],labelMaxTotalFileSizeExceeded:["Maximum total size exceeded",l.STRING],labelMaxTotalFileSize:["Maximum total file size is {filesize}",l.STRING]}}};"undefined"!=typeof navigator&&document&&document.dispatchEvent(new CustomEvent("FilePond:pluginloaded",{detail:plugin$1}));export default plugin$1;
/*
* FilePondPluginFileValidateSize 1.0.2
* FilePondPluginFileValidateSize 1.0.3
* Licensed under MIT, https://opensource.org/licenses/MIT

@@ -123,3 +123,3 @@ * Please visit https://pqina.nl/filepond for details.

if (document) {
if (typeof navigator !== 'undefined' && document) {
// plugin has loaded

@@ -126,0 +126,0 @@ document.dispatchEvent(

/*
* FilePondPluginFileValidateSize 1.0.2
* FilePondPluginFileValidateSize 1.0.3
* Licensed under MIT, https://opensource.org/licenses/MIT
* Please visit https://pqina.nl/filepond for details.
*/
!function(e,i){"object"==typeof exports&&"undefined"!=typeof module?module.exports=i():"function"==typeof define&&define.amd?define(i):e.FilePondPluginFileValidateSize=i()}(this,function(){"use strict";var e=function(e){var i=e.addFilter,l=e.utils,t=l.Type,n=l.replaceInString,E=l.toNaturalFileSize;return i("ALLOW_HOPPER_ITEM",function(e,i){var l=i.query;if(!l("GET_ALLOW_FILE_SIZE_VALIDATION"))return!0;var t=l("GET_MAX_FILE_SIZE");return!(null!==t&&e.size>t)}),i("LOAD_FILE",function(e,i){var l=i.query;return new Promise(function(i,t){if(!l("GET_ALLOW_FILE_SIZE_VALIDATION"))return void i(e);var a=l("GET_MAX_FILE_SIZE");if(null!==a&&e.size>a)return void t({status:{main:l("GET_LABEL_MAX_FILE_SIZE_EXCEEDED"),sub:n(l("GET_LABEL_MAX_FILE_SIZE"),{filesize:E(a)})}});var u=l("GET_MAX_TOTAL_FILE_SIZE");if(null!==u){var _=l("GET_ITEMS").reduce(function(e,i){return e+i.fileSize},0);if(_+e.size>u)return void t({status:{main:l("GET_LABEL_MAX_TOTAL_FILE_SIZE_EXCEEDED"),sub:n(l("GET_LABEL_MAX_TOTAL_FILE_SIZE"),{filesize:E(u)})}})}i(e)})}),{options:{allowFileSizeValidation:[!0,t.BOOLEAN],maxFileSize:[null,t.INT],maxTotalFileSize:[null,t.INT],labelMaxFileSizeExceeded:["File is too large",t.STRING],labelMaxFileSize:["Maximum file size is {filesize}",t.STRING],labelMaxTotalFileSizeExceeded:["Maximum total size exceeded",t.STRING],labelMaxTotalFileSize:["Maximum total file size is {filesize}",t.STRING]}}};return document&&document.dispatchEvent(new CustomEvent("FilePond:pluginloaded",{detail:e})),e});
!function(e,i){"object"==typeof exports&&"undefined"!=typeof module?module.exports=i():"function"==typeof define&&define.amd?define(i):e.FilePondPluginFileValidateSize=i()}(this,function(){"use strict";var e=function(e){var i=e.addFilter,l=e.utils,t=l.Type,n=l.replaceInString,E=l.toNaturalFileSize;return i("ALLOW_HOPPER_ITEM",function(e,i){var l=i.query;if(!l("GET_ALLOW_FILE_SIZE_VALIDATION"))return!0;var t=l("GET_MAX_FILE_SIZE");return!(null!==t&&e.size>t)}),i("LOAD_FILE",function(e,i){var l=i.query;return new Promise(function(i,t){if(!l("GET_ALLOW_FILE_SIZE_VALIDATION"))return void i(e);var a=l("GET_MAX_FILE_SIZE");if(null!==a&&e.size>a)return void t({status:{main:l("GET_LABEL_MAX_FILE_SIZE_EXCEEDED"),sub:n(l("GET_LABEL_MAX_FILE_SIZE"),{filesize:E(a)})}});var u=l("GET_MAX_TOTAL_FILE_SIZE");if(null!==u){var _=l("GET_ITEMS").reduce(function(e,i){return e+i.fileSize},0);if(_+e.size>u)return void t({status:{main:l("GET_LABEL_MAX_TOTAL_FILE_SIZE_EXCEEDED"),sub:n(l("GET_LABEL_MAX_TOTAL_FILE_SIZE"),{filesize:E(u)})}})}i(e)})}),{options:{allowFileSizeValidation:[!0,t.BOOLEAN],maxFileSize:[null,t.INT],maxTotalFileSize:[null,t.INT],labelMaxFileSizeExceeded:["File is too large",t.STRING],labelMaxFileSize:["Maximum file size is {filesize}",t.STRING],labelMaxTotalFileSizeExceeded:["Maximum total size exceeded",t.STRING],labelMaxTotalFileSize:["Maximum total file size is {filesize}",t.STRING]}}};return"undefined"!=typeof navigator&&document&&document.dispatchEvent(new CustomEvent("FilePond:pluginloaded",{detail:e})),e});
{
"name": "filepond-plugin-file-validate-size",
"version": "1.0.2",
"version": "1.0.3",
"description": "File Size Validation Plugin for FilePond",
"homepage": "https://pqina.nl/filepond",
"repository": "pqina/filepond-plugin-file-validate-size",
"main": "dist/filepond-plugin-file-validate-size.js",

@@ -7,0 +8,0 @@ "browser": "dist/filepond-plugin-file-validate-size.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc