Back

[SOLVED] Building VS Code Extension + Appwrite

  • 1
  • Self Hosted
  • Web
Akash Srinivasan
25 May, 2023, 15:07

I am trying to push an image to appwrite storage bucket from vscode WebView (which under the hood uses html/css and js inside an iframe origin) but my request is getting rejected. It did be great if anyone helps us. Thanks

I found that for some reason my origin/request is blocked or rejected. Though all the key's are correct

TL;DR
Issue: User is trying to push an image to an Appwrite storage bucket from a VSCode WebView, but the request is getting rejected due to blocked or rejected origin. Solution: The issue was related to CORS (Cross-Origin Resource Sharing). The user had not linked their extension to the Appwrite dashboard by providing the URL. By properly linking the extension to the Appwrite dashboard, the rejection issue was resolved.
safwan
25 May, 2023, 17:07
  1. Have you added the platform for this implementation?
  2. I'm not sure, but does the endpoint need to be a vscode-webview? As far as I know, the endpoint is supposed to be the URL of your appwrite instance.
Akash Srinivasan
25 May, 2023, 18:25

Thanks for replying sadwan but @Meldiron as resolved my issue. It was related to cors as I have not linked my extension to apperite dashboard by giving the url.

Drake
26 May, 2023, 15:42

What exactly did you do? You added a web platform? And what did you put as the hostname? The VSCode extension ID?

Christy Jacob
26 May, 2023, 16:02

[SOLVED] Building VS Code Extension + Appwrite

Akash Srinivasan
26 May, 2023, 17:48

Hey @Steven I had just added * as hostname

Akash Srinivasan
26 May, 2023, 17:50

I tried with vs code extension id but it was not working. It was rejecting my origin

Drake
26 May, 2023, 17:54

interesting...thanks for the insight!

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more