Upload issues between v0 and Vercel Blob Storage

Seemingly simple task to upload a (small size) file to a known/created blob store. This is a shared blob store with another one of my projects.

  1. Created a project with correct Blob env var ‘read write token’. Connected the project to v0.
  2. Sent v0 the simple documentation about using put () etc from Vercel docs
  3. Said it was ok to use my token value in code

Result: consistently returns Response as html instead of simple JSON response:
Upload error: Unexpected token ‘<’, "<!DOCTYPE "… is not valid JSON

Is there a template etc for this? I’m not sure why this has been a challenge, it’s all Vercel no middleware etc…

Hey @jayhilwig are you able to share a snippet of your implementation (making sure to obfuscate the token)? Also how are you calling this? Are you using server actions/route handlers, from the client, or via the sdk?

If you’re able to print the full error as well, that could help in diagnosing the issue.

Thanks Josh, do these screenshots help at all. As an fyi, I am a designer dabbling in code :slight_smile:


1 Like

Hmm and your token is set within the project settings?

Yes as attached. I know it’s something simple…

Vercel set up some test UI with Post/Get and we eventually resolved this, thanks for the feedback Josh!

2 Likes

glad you got it all resolved!

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.