docs icon indicating copy to clipboard operation
docs copied to clipboard

OpenAPI Spec: Issues with uploading files

Open karanataryn opened this issue 1 year ago • 20 comments

The Mintlify Web UI does not correctly upload files in the API request, passing it as a string instead of a file object. This leads to errors as seen below: {"detail":[{"type":"value_error","loc":["body","file"],"msg":"Value error, Expected UploadFile, received: <class 'str'>","input":"[object Object]","ctx":{"error":{}}}]}

The construction of the cURL object is incorrect, as seen below: curl --request POST \ --url https://url \ --header 'Authorization: Bearer REDACTED' \ --header 'Content-Type: multipart/form-data' \ --form 'file={}'

which should instead contain --form '[email protected]'

karanataryn avatar Nov 12 '24 19:11 karanataryn

@karanataryn is this fixed, I am still facing same error

mayank-ekacare avatar Nov 22 '24 13:11 mayank-ekacare

@karanataryn is this fixed, I am still facing same error

@mayank-ekacare I don't think so.

karanataryn avatar Nov 27 '24 00:11 karanataryn

@fmerian are there any updates on this? i run into the same issue :)

Gawc1uuu avatar Dec 03 '24 11:12 Gawc1uuu

Bump on this.

spencerjsmall avatar Jan 08 '25 18:01 spencerjsmall

Bump

krakenftw avatar Jan 22 '25 05:01 krakenftw

We're having the same issue. Bump.

NayamAmarshe avatar Feb 01 '25 10:02 NayamAmarshe

same here

mdhvcgf avatar Feb 26 '25 12:02 mdhvcgf

Hello, Any update. This issue is really bugging us.

iyuvraajsingh avatar Mar 04 '25 00:03 iyuvraajsingh

Team mintlify,

What is stopping us to look into issue?

@tiffany-mintlify @katemintlify @mintlifydavid @hahnbeelee

mayank-ekacare avatar Mar 04 '25 03:03 mayank-ekacare

Hi Team, Could you please provide an update on when this will be fixed? Thank you

Pierre-VV avatar Apr 10 '25 01:04 Pierre-VV

Thanks for the fix @dino475 ! Single file uploads work great now, but arrays of files (using the files[] parameter) still don't work correctly. Could you address this case too? Thank you

pierre-tabet avatar Apr 17 '25 09:04 pierre-tabet

Hey everyone, we're working on this and will follow up here shortly

dino475 avatar Apr 17 '25 17:04 dino475

Hi @dino475 , just following up on arrays of files (using the files[] parameter) still don't work correctly. Could you address this case too? Thank you

pierre-tabet avatar May 30 '25 13:05 pierre-tabet

We’re on it - a PR is in the works and should be merged soon!

dino475 avatar Jun 01 '25 21:06 dino475

@dino475 Any updates on the PR mentioned on June 1? I suspect the issues mentioned in this thread are causing the "011000010111000001101001" strings to be added to our sample scripts.

lai-bianca avatar Jul 04 '25 05:07 lai-bianca

@dino475 Hey, any update on this PR? Almost 3 months after your last comment and almost 6 after the expected shortly follow up. Thanks!

Segfaultd avatar Oct 01 '25 08:10 Segfaultd

hey @Segfaultd we merged a fix 2 weeks ago but are you still running into issues?

tiffany-mintlify avatar Oct 01 '25 16:10 tiffany-mintlify

hey @Segfaultd we merged a fix 2 weeks ago but are you still running into issues?

Hi, yes well the exact same issue as referenced in first place. When you upload a file, the generated payload is empty file={}

Segfaultd avatar Oct 02 '25 08:10 Segfaultd

hey @Segfaultd we merged a fix 2 weeks ago but are you still running into issues?

Hello :-) Any news?

Segfaultd avatar Oct 28 '25 21:10 Segfaultd

hey @Segfaultd we merged a fix 2 weeks ago but are you still running into issues?

Hi, yes well the exact same issue as referenced in first place. When you upload a file, the generated payload is empty file={}

Hi @Segfaultd can you please share a link to where this is happening so we can reproduce and record the issue for our team?

dino475 avatar Oct 29 '25 01:10 dino475