Comments (4)
there you go! Nice debugging!
from convex-demos.
Hi. It is supported. The storage upload via upload URL is framework agnostic.
Could you provide your code? What API call(s0) are giving an undefined storageId?
from convex-demos.
Hi Nipunn and thank you for getting back to me.
My code is identical to documentation, I set the file's uri in state and upon upload click I call this code:
const postUrl = await generateUploadUrl();
console.log({ postUrl });
const result = await fetch(postUrl, {
method: "POST",
headers: { "Content-Type": "image" },
body: myImage
});
const { storageId } = await result.json();
console.log({ storageId });
LOG {"postUrl": "https://graceful-[partOfURL].convex.cloud/[partOfURL]upload?token=[SOMETOKEN]"}
LOG {"storageId": undefined}
I did more digging and was able to find the issue, I logged out the complete response (instead of just {storageId}
) and this is what I see.
{"res": {"code": "BadHeader", "message": "Bad header for content-type: invalid HTTP header"}}
is hardcoding the contentType to image
the problem?
Thanks.
from convex-demos.
just ignore it already, it has to be image/*
from convex-demos.
Related Issues (16)
- UI HOT 3
- Will there be Vue JS/ Nuxt JS support in the near future? HOT 3
- UserIdentity.tokenIdentifier vs UserIdentity.subject in storeUser function HOT 1
- Does it support for svelte kit HOT 2
- Is it possible to use zod objects within defineSchema function HOT 3
- What is the best practice to store date? HOT 1
- why outgoing request timed out? HOT 4
- Clerck and Convex setup in Expo app HOT 2
- Error when i enter the device name HOT 2
- Error with Next.js rendering HOT 1
- Serving saved images do not work HOT 3
- TypeError: console.time is not a function
- defining two tables in schema produces type errors HOT 8
- testing HOT 2
- Having issues with the storeUser.ts function HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from convex-demos.