You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I understand this is a feature request and questions should be posted in the Community Forum
I searched issues and couldn’t find anything (or linked relevant results below)
Problem
Many times we need to use different services for different types of files.
Images should not necessarily use the same uploader or be uploaded to the same place as videos, PDFs, etc.
This commit #4218 reports the need to use @uppy/aws-s3 and @uppy/aws-s3-multipart depending on the file size.
In my case I need to use @uppy/aws-s3 for small files and @uppy/tus for videos that will be uploaded to Cloudflare Stream.
Uppy currently allow multiple uploaders per instance, but it uploads each file in each uploader always.
Solution
We need a way to optionally specify which uploader to use for different files, based on properties like fileType, size, source, isRemote or custom meta.
Add a method like onBeforeFileUpload in the .use(Plugin) options that returns a boolean or a modified file, just like onBeforeFileAdded:
Hi! We considered this with the team and decided it won’t be high on our list to implement, as similar functionality can be achieved on the server side or with a 3rd party service, like Transloadit — set up rules and sort files into different destinations, based on X.
However, if you are interested in contributing a PR, we’ll help.
I am finding a need for this as well, and having a backend service decide isn't an option. For now im going to need to patch one+ plugins to skip a file and use a custom provider for another case.
My case is simple: Need to use a post upload or a TUS upload based on filesize. Each goes to a different backend. Im also using uppy/core with a custom UI in react + tailwind and so not using the dashboard or other components.
I may end up submitting a PR for this at some point if no one else does.
Initial checklist
Problem
Many times we need to use different services for different types of files.
Images should not necessarily use the same uploader or be uploaded to the same place as videos, PDFs, etc.
This commit #4218 reports the need to use @uppy/aws-s3 and @uppy/aws-s3-multipart depending on the file size.
In my case I need to use @uppy/aws-s3 for small files and @uppy/tus for videos that will be uploaded to Cloudflare Stream.
Uppy currently allow multiple uploaders per instance, but it uploads each file in each uploader always.
Solution
We need a way to optionally specify which uploader to use for different files, based on properties like fileType, size, source, isRemote or custom meta.
Add a method like onBeforeFileUpload in the .use(Plugin) options that returns a boolean or a modified file, just like onBeforeFileAdded:
Alternatives
Allow set the uploader in the .addFile method:
The text was updated successfully, but these errors were encountered: