0xtech
0xtech
Explore posts from servers
FFilament
Created by 0xtech on 10/2/2024 in #❓┊help
I'm seeking work as a full stack developer
Hello Everyone I'm seeking work as a full stack developer. If you have any work and planning new, kindly let me know. Here is my portfolio. https://shinobi8894.onrender.com/ Thank you
4 replies
FFilament
Created by 0xtech on 10/1/2024 in #❓┊help
I'm seeking work as a full stack developer
Hello Everyone I'm seeking work as a full stack developer. If you have any work and planning new, kindly let me know. Here is my portfolio. https://shinobi8894.onrender.com/ Thank you
2 replies
CCConvex Community
Created by 0xtech on 4/9/2024 in #support-community
How to get image url after uploaded image ?
const handleAvatarUpload = useCallback(async (file: File) => {
try {
setUploadLoading(true);
const postUrl = await generateUploadUrl();
// Step 2: POST the file to the URL
const result = await fetch(postUrl, {
method: "POST",
headers: { "Content-Type": file!.type },
body: file,
});

const { storageId } = await result.json();
} catch (error) {
toast("Something went wrong", {
description: "Our support team has been notified",
});
console.error("Failed to update user profile", error);
}
}, []);
const handleAvatarUpload = useCallback(async (file: File) => {
try {
setUploadLoading(true);
const postUrl = await generateUploadUrl();
// Step 2: POST the file to the URL
const result = await fetch(postUrl, {
method: "POST",
headers: { "Content-Type": file!.type },
body: file,
});

const { storageId } = await result.json();
} catch (error) {
toast("Something went wrong", {
description: "Our support team has been notified",
});
console.error("Failed to update user profile", error);
}
}, []);
I wanna get image url with stroage id after I uploaded image
22 replies