application-research / estuary-docusaurus

Official Estuary Documentation Website (built with Docusaurus)
https://docs-beta.estuary.tech/
2 stars 4 forks source link

example upload is failing #14

Open snissn opened 1 year ago

snissn commented 1 year ago

the displayed curl code is correct, but when it runs it receives the error "details": "no multipart boundary param in Content-Type"

on further investigation this seems to be a common issue with using fetch - https://stackoverflow.com/questions/39280438/fetch-missing-boundary-in-multipart-form-data-post

may require a modification to the internal api library

gmelodie commented 1 year ago

Can you paste the curl command you're referring to?

snissn commented 1 year ago

yeah @gmelodie right here! https://whimsical-marzipan-4409a2.netlify.app/Tutorial/tutorial-uploading-your-first-file

in this page on the tutorial

curl -L -X POST 'https://api.estuary.tech/content/add' \
-H 'Content-Type: multipart/form-data' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer xyz' \
-F 'data=@"filename"' \
-F 'filename="filename"'

is the curl command that gets generated

the javascript that gets run under the hood when you click "execute" seems ot have a problem -- something in here https://github.com/cloud-annotations/docusaurus-openapi/blob/e6f19478badb386cb468534a871955ee4458ebae/packages/docusaurus-theme-openapi/src/theme/ApiDemoPanel/Execute/makeRequest.ts

related to the stack over flow link -- it's a bit detailed for a naunaced bug fwiw