Building42 / Telegraph

Secure Web Server for iOS, tvOS and macOS

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Supporting Multipart File Upload Request

masture opened this issue · comments

Greeting,

Do you foresee implementation of the multipart file upload support?

My use case is: The Web Server is running on iOS device and it receives files from an Android DashCam. The DashCam is a WiFi hotspot and the iPhone is connected to the same. So both are on local network and can interact with each other.

At present I am using GCDWebServer on iOS and I am able to receive files from the DashCam. The GCDWebServer is unsecured / HTTP (not HTTPS). However due to some regulatory requirements I need to have secure connection. That is when I came across Telegraph Secure Web Server and I was able to use it in 90% uses cases very easily. Thanks you 🙏. But this keeps out one use case to receive multipart file upload.

Hence I am reaching out to you, for support. Do you think Telegraph will support multipart file upload?

I see in another related question, you suggest to upload the file as raw data as part of request body. I will see if we can use that. But in our use case the uploaded file is a video and it could be fairly large sizes , around 50 MB. As per the this answer from stackoverflow, the max size of body is limited by both the server and client. So in case of Telegraph what is the max body size allowed? How to configure it?

Thanks and regards,
Pankaj

Unfortunately Telegraph doesn't support multi-part requests. Telegraph will work fine with small request/response payloads, but will use a lot of memory once you try to send/receive large datasets.

It will require quite a bit of work to implement this. I won't be able to add it anytime soon, but PRs are welcome.

Related to #27