Upload Attachment via public API (Problem with payload format) #10286
Unanswered
Julianmenav
asked this question in
Help
Replies: 1 comment 1 reply
-
Hey @Julianmenav Looking at the code, it appears that file is expected as a File object with a number of properties including a write stream. I'm not sure how you would convert between the JavaScript FormData object and a python type. It's worth noting that this endpoint is an internal one, and is designed to be used by the AttachmentField in the UI. It is not available via the public API. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am trying to upload images to budibase storing as default in Minio. The app is self hosted.
Im sending a post request to the url: https://budibase.app/api/attachments/${bbtableid}/upload
with of course all headers already set, but dont really know how the payload has to be.
I have already seen this disscussion :
#3725 and try to replicate it in my python app in which I think the payload has the same format :
It always respond with the error message 500:"Cannot read properties of undefined (reading 'file')"
All other API calls like retrieving rows, tables or update them works perfectly but with this one im struggling.
It would be very much appreciated to know how to upload an image as attachment to budibase from my python code, or how the payload of the request should be. Thanks in advance
Beta Was this translation helpful? Give feedback.
All reactions