Skip to content

Commit

Permalink
chore: use ufsUrl in examples (#1135)
Browse files Browse the repository at this point in the history
  • Loading branch information
juliusmarminge authored Jan 19, 2025
1 parent df685ce commit b7d84e4
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ export function ProfilePictureCard(props: { user: User }) {

setNewImageLoading(true);
await Promise.all([
updateUserImage(uploadedFile.url),
waitForImageToLoad(uploadedFile.url).catch(toast.error),
updateUserImage(uploadedFile.ufsUrl),
waitForImageToLoad(uploadedFile.ufsUrl).catch(toast.error),
]);
setNewImageLoading(false);

Expand Down
2 changes: 1 addition & 1 deletion examples/profile-picture/src/uploadthing/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export const uploadRouter = {
*/
await db
.update(User)
.set({ image: file.url })
.set({ image: file.ufsUrl })
.where(eq(User.id, metadata.userId));

/**
Expand Down
2 changes: 1 addition & 1 deletion examples/with-clerk-remix/app/routes/api.uploadthing.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export const uploadRouter = {
})
.onUploadComplete(async ({ metadata, file }) => {
console.log("Upload complete for userId:", metadata.userId);
console.log("file url", file.url);
console.log("file url", file.ufsUrl);
}),
} satisfies FileRouter;

Expand Down
2 changes: 1 addition & 1 deletion examples/with-drizzle-appdir/src/server/uploadthing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export const uploadRouter = {
await db.insert(files).values({
name: file.name,
key: file.key,
url: file.url,
url: file.ufsUrl,
uploadedBy: metadata.uploaderId,
});

Expand Down
2 changes: 1 addition & 1 deletion examples/with-drizzle-pagesdir/src/server/uploadthing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export const uploadRouter = {
await db.insert(files).values({
name: file.name,
key: file.key,
url: file.url,
url: file.ufsUrl,
uploadedBy: metadata.uploaderId,
});
}),
Expand Down
2 changes: 1 addition & 1 deletion examples/with-serveractions/src/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export default function Home() {
const uploadedFile = await uploadFromUrl(fd);
if (uploadedFile) {
setIsUploading(false);
open(uploadedFile.url, "_blank");
open(uploadedFile.ufsUrl, "_blank");
}
}}
>
Expand Down

0 comments on commit b7d84e4

Please sign in to comment.