Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export default function uppyInit(options, onSuccess) {
const uppy = Uppy({
debug: true,
autoProceed: options.autoProceed,
restrictions: options.restrictions || '',
});
uppy.use(Tus10, { endpoint: options.endpoint, resume: true });
uppy.use(Dashboard, {
trigger: options.trigger,
inline: options.DashboardInline,
target: options.target,
note: options.restrictions || 'Images and video only, 300kb or less',
});
if (options.GoogleDrive) {
uppy.use(GoogleDrive, { target: Dashboard, host: SERVER });
}
if (options.Dropbox) {
uppy.use(Dropbox, { target: Dashboard, host: SERVER });