Вопрос

I am curious how to go about this solution. We are planning to have various clients upload video files to our Node.js server hosted on Heroku. From there, we can stream it to cloudinary. We cannot bypass the server and do a direct upload from client to cloudinary.

Problems/Details:
*Heroku times out after 30 seconds if no data is sent back
*Average video file size will be 15mb. *If client is an iphone with slow connection, heroku needs to keep the transfer live until file has been completed uploaded.

I was thinking maybe chunking the data, each chunk send status to client trying to keep the connection alive.

Anyone with experience trying this?

Это было полезно?

Решение

From Heroku:

Hi,

While there aren't any size restrictions on requests such as these, you're most likely going to run into the 30-second timeout problem. The only way around the timeout is with long polling, as described here. I'm not aware of any drop-in implementations of this for file uploads, though. I'm guessing this traffic is coming from an app or something that makes it impractical to implement Cloudinary's direct upload out of the box. Are there other reasons you couldn't adapt Cloudinary's direct upload solution? I'd like to get their input on this as well.

Thanks,
Chad

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top