Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support max file size per file type #3

Open
hbgl opened this issue Jan 16, 2019 · 2 comments
Open

Support max file size per file type #3

hbgl opened this issue Jan 16, 2019 · 2 comments

Comments

@hbgl
Copy link

hbgl commented Jan 16, 2019

Hi, thanks for the great plugin.

I want my users to be able to upload images and videos using the same filepond uploader. For images I want a smaller max file size and for videos I want a bigger max file size.

Would it make sense to add this configuration to the plugin? Something like this would fit the use-case perfectly:

const filePondOptions = {
  maxFileSize: {
    "image/*": 5242880,
    "image/png": 10485760,
    "video/mp4": 104857600,
  },
}

Cheers

@rikschennink
Copy link
Collaborator

I'll consider this. In the meantime, I think it would be fastest to fork the repo and create a custom plugin.

@willvincent
Copy link

willvincent commented Nov 21, 2023

I definitely need this too.. Please consider my PR as there hasn't been any other movement on this in nearly 5 years. 😊

Anyone else in need, unless/until this is merged and released, you can use by adding to your dependencies, thusly:

"filepond-plugin-file-validate-size": "[email protected]:willvincent/filepond-plugin-file-validate-size.git",

Can't load from cdn though, of course.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants