Skip to content

Commit 83a0be1

Browse files
committed
Allow All Kind of File Types
1 parent a4aa904 commit 83a0be1

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,4 +115,4 @@ can be approved:
115115
- [x] Add "ownership" to files and folders
116116
- [x] Upload files to the right folder
117117
- [ ] Delete file button
118-
- [ ] Allow files that are not images to be uploaded
118+
- [x] Allow files that are not images to be uploaded

src/app/api/uploadthing/core.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import * as queries from "~/server/db/queries";
1111
const f = createUploadthing();
1212

1313
export const ourFileRouter = {
14-
imageUploader: f({ image: { maxFileSize: "4MB", maxFileCount: 1 } })
14+
driveUploader: f({ blob: { maxFileSize: "4MB", maxFileCount: 1 } })
1515
.input(z.object({ folderId: z.number() }))
1616
.middleware(async ({ input }) => {
1717
const user = await auth();

src/app/drive-contents.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ export default function DriveContents(props: {
6565
</ul>
6666
</div>
6767
<UploadButton
68-
endpoint="imageUploader"
68+
endpoint="driveUploader"
6969
input={{ folderId: props.currentFolderId }}
7070
onClientUploadComplete={() => {
7171
navigate.refresh();

0 commit comments

Comments
 (0)