mirror of
https://github.com/transloadit/uppy.git
synced 2026-07-18 09:05:55 +00:00
This PR removes `@uppy/store-redux` , `@uppy/redux-dev-tools` , `@uppy/progress-bar` , `@uppy/drag-drop` , `@uppy/file-input` , `@uppy/aws-s3-multipart` - **Source Removal** Removed source Dirs of packages, including all source code, styles, documentation, and build configurations. - **Bundle & Exports** Removed related exports from `packages/uppy/src/bundle.ts` and `index.ts`. Cleaned up dependencies from `uppy/package.json`. - **Framework Cleanup** Removed components and exports from: - `@uppy/react` - `@uppy/vue` - `@uppy/svelte` - `@uppy/angular` - **Dependency Cleanup** Removed references across all `package.json`, `peerDependencies`, `tsconfig.*.json`, and `turbo.json` files. - **Example Updates** - Updated Angular example and `private/dev/DragDrop.js` - Removed deprecated plugin usage - Cleaned example dependencies - **Style Cleanup** Removed CSS imports from `packages/uppy/src/style.scss` and `examples/angular/src/styles.css`. Fixed TypeScript project references. - **Migration Guide** Updated `.github/MIGRATION.md`
35 lines
1 KiB
JavaScript
35 lines
1 KiB
JavaScript
// The @uppy/ dependencies are resolved from source
|
|
import Uppy from '@uppy/core'
|
|
import Dashboard from '@uppy/dashboard'
|
|
import Tus from '@uppy/tus'
|
|
|
|
// DEV CONFIG: create a .env file in the project root directory to customize those values.
|
|
const { VITE_TUS_ENDPOINT: TUS_ENDPOINT } = import.meta.env
|
|
|
|
import.meta.env.VITE_TRANSLOADIT_KEY &&= '***' // to avoid leaking secrets in screenshots.
|
|
import.meta.env.VITE_TRANSLOADIT_SECRET &&= '***' // to avoid leaking secrets in screenshots.
|
|
console.log(import.meta.env)
|
|
|
|
export default () => {
|
|
const uppyDashboard = new Uppy({
|
|
debug: true,
|
|
autoProceed: false,
|
|
})
|
|
.use(Dashboard, {
|
|
target: '#uppyDragDrop',
|
|
inline: true,
|
|
})
|
|
.use(Tus, { endpoint: TUS_ENDPOINT })
|
|
|
|
window.uppy = uppyDashboard
|
|
|
|
uppyDashboard.on('complete', (result) => {
|
|
if (result.failed.length === 0) {
|
|
console.log('Upload successful 😀')
|
|
} else {
|
|
console.warn('Upload failed 😞')
|
|
}
|
|
console.log('successful files:', result.successful)
|
|
console.log('failed files:', result.failed)
|
|
})
|
|
}
|