Possible for users to upload videos?

I’m researching if it is possible / how difficult it is to set up a way for visitors to a site to upload videos, primarily from their phones.

The uploaded video files will then be reviewed, by the editor, download, and upload to a youtube channel, (and then linked to from the Kirby site / embedded on the Kirby site).

I think the client is thinking of doing it this way, so that anyone can upload a video (they don’t need a YouTube / Google account).

I presume this is possible in Kirby? And if so do you have any pointers?

Are there security issues?
I presume because the videos won’t live on the clients server they won’t have to buy massive server storage?

Check out this recipe: Uploading files | Kirby CMS. While the example uses images, this can be adapted.

1 Like

If the users upload them to the client’s server, they will live on the client’s server.

One hurdle could be that v4 can run into upload size limits, which video files might exceed. v5 will add chunked uploads for the Panel that allow uploads with no specific size limit. While this is for the Panel and not for your own frontend upload, you would still need to implement the chunking on your frontend part. But at least the backend support will be in place in v5 which in v4 you would have a harder time to implement as well.

If the video files aren’t too big, Uploading large video files? - #3 by Andi-Lo probably still applies for handling the limits.

1 Like

Unless, and that’s how I understand the task, they are removed as soon as uploaded to YouTube.

Yes but depending what videos these are, they can easily be a few hundred GBs big per video. Until they are uploaded to YouTube and removed, they need space. And if it’s then on a small webspace package, that’s something to consider.

Yeah, the videos are only temporarily on the clients server, until the client has time to download and remove. Perhaps a couple of days and perhaps only a couple of videos at a time will exist on the client server. I’ll need to look into the webspace package.

Hmm, the client is asking for 2 minute videos, which will probably end up being around 200–500 MB. Will this be an issue for frontend uploading?

  • The video needs to be uploaded with information: a title, location and appropriate tags. I presume this would require additional fields to the form. Where would this information go, and how is it kept associated with the video? Would this info go in a txt file with the same name as the (renamed) video file?

  • Ideally the user should be able to pin their location on a map of the world, and these coordinates get added to the video file txt file. But this sounds tricky, so we might need to keep the location to country level. And the client adds the pins and links to the video manually after embedding the YouTube video.

  • Would it be possible for the client to be notified (emailed) when a video is uploaded?

  • The client needs to be able to download the video and remove it from the server. Can this be done in the Panel, on the Storage page? (If the video is good the client will then upload it to YouTube).

  • Presumably when a frontend user clicks the input field it will open the device’s native file picker – allowing them to select a video from their photos app?

It might make more sense to directly upload the videos to some external storage like Amazon S3 if the hosting package has limitations. Or even to YouTube but lock it for public viewing.

Yeah, I’m thinking this sounds like a complicated process – but the videos need to be for public viewing and the client wants anyone to be able to contribute a video, without having to create a YouTube / Google account.

The idea is to get people across the world to upload videos on how the climate emergency is effecting them. So it has to be super easy for people to upload.

I was wondering about setting up a Google Drive or Dropbox shared folder for people to upload video to. But I’m not sure how we could also capture the title and location of the video (and possibly category tags). I suppose Amazon S3 would have a similar problem. I’m also not sure if there are security issues with this approach.

I would upload to Bunny.net and use their player for playback. The downside to this method is that you need to pay for storage and bandwidth, however they are significantly cheaper than Amazon S3 or most other video streaming providers.

Storage typical costs around $0.01 USD per GB and bandwidth from $0.005 USD per GB (depending on which tier you use).

Unless you have huge amounts of videos, you shouldn’t need to spend more than a couple of dollars each month for video storage and playback.

DM if you want a referral link (or just sign up through the site)

2 Likes

Thanks for the suggestion. I’ve contacted their support with a few questions.