BCF-API icon indicating copy to clipboard operation
BCF-API copied to clipboard

The "POST" document service doesn't specify how to upload the file

Open cosmo0 opened this issue 7 months ago • 3 comments

How should I upload the file? If I upload using application/octet-stream as it seems the spec says (see Swagger), I don't have the filename:

curl --location 'https://.../documents' \
        --header 'Content-Type: application/octet-stream' \
        --header 'Authorization: Bearer xxxx' \
        --data 'my_file.pdf'

If I upload it using multipart/form-data it doesn't respect the spec, and the field name is not specified anyway.

cosmo0 avatar Jul 26 '24 15:07 cosmo0