Closed lithiumfrost closed 11 months ago
Hi @lithiumfrost - sorry for the late reply. I'll have a look at this soon...
@lithiumfrost I don't understand the question. What exactly should be possible? In general, it's not neseccary to have anything saved to disk. Or: Is the question about content type "guessing", so that (Some "image/jpeg")
could omitted?
Happy to explain.
The MIME "part" in a multipart form-data submission has multiple pieces of metadata:
------WebKitFormBoundaryN8Y1MQiNiQs7fEEd
Content-Disposition: form-data; name="images"; filename="testfile1.txt"
Content-Type: text/plain
Hello World, no trailling newlines
------WebKitFormBoundaryN8Y1MQiNiQs7fEEd
I can provide the mime-type, but I can't provide the filename value in the header (the third header value in the example) which is required by telegram in the API call. I believe that it's the same specification as a web browser has.
I am using the following code with Telegram:
And it seems to hit that bot API correctly, a filename parameter is required in addition to the fieldname (photo).
Is there a way to do this that doesn't rely on having to save the byte[] or stream to disk and then use the existing filePart DU?