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
Summary
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
May 25, 2023, 17:07
Have you added the platform for this implementation?
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
Rank 2: Process
May 25, 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
Admin
May 26, 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
May 26, 2023, 16:02
[SOLVED] Building VS Code Extension + Appwrite
Akash Srinivasan
Rank 2: Process
May 26, 2023, 17:48
Hey @Steven I had just added * as hostname
Akash Srinivasan
Rank 2: Process
May 26, 2023, 17:50
I tried with vs code extension id but it was not working. It was rejecting my origin