Skip to content

Commit

Permalink
Add image editor
Browse files Browse the repository at this point in the history
  • Loading branch information
kotx committed Aug 13, 2023
1 parent 9ca453a commit 61dec7b
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 0 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"@uppy/core": "^3.3.1",
"@uppy/dashboard": "^3.5.0",
"@uppy/golden-retriever": "^3.1.0",
"@uppy/image-editor": "^2.1.2",
"hono": "^3.4.1",
"mime": "^3.0.0",
"ofetch": "^1.1.1"
Expand Down
18 changes: 18 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions src/client/index.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
import Uppy from "@uppy/core";
import Dashboard from "@uppy/dashboard";
import GoldenRetriever from "@uppy/golden-retriever";
import ImageEditor from "@uppy/image-editor";
import S3 from "@uppy/aws-s3";
import { ofetch } from "ofetch";

import "@uppy/core/dist/style.min.css";
import "@uppy/dashboard/dist/style.min.css";
import "@uppy/image-editor/dist/style.min.css";

new Uppy()
.use(Dashboard, {
Expand All @@ -15,6 +17,7 @@ new Uppy()
showLinkToFileUploadResult: true,
})
.use(GoldenRetriever, { serviceWorker: true })
.use(ImageEditor, { target: Dashboard, quality: 1.0 })
.use(S3, {
// Only use multipart uploads for files larger than 100 MB.
shouldUseMultipart: true, // TODO: (file) => file.size > 100 * 2 ** 20,
Expand Down

0 comments on commit 61dec7b

Please sign in to comment.