nodetube icon indicating copy to clipboard operation
nodetube copied to clipboard

Limit user to 1 upload at a time unless they have Plus

Open mayeaux opened this issue 5 years ago • 5 comments

Currently people can upload multiple videos at once. I don't really like this setup because people can spam uploads, it should be limited to 1 video at a time unless they're a paying user

mayeaux avatar Jan 27 '20 05:01 mayeaux

payments don't work right now so please fix that first.

ralyodio avatar Mar 02 '20 00:03 ralyodio

And let's also make it that they can only have 1 video converting at once, and then make sure we have a thing where we detect if a conversion fails and mark the upload as failed

mayeaux avatar May 08 '20 03:05 mayeaux

@mayeaux My plan before I write any code:

Check if they are already uploading a file with an if statement in postFileUpload in /controllers/backend/uploading. I'll create a property isCurrentlyUploading (bool) in the User model. This boolean should be made true at the start of post file upload and made false if an upload fails and when an upload (AND conversion?) finishes.

If a conversion fails, I'm not entirely sure where I should be marking the upload as failed. I'm also curious as to why you'd like this functionality.

I'll start writing the code after you reply 😀

Mxchaeltrxn avatar May 10 '20 10:05 Mxchaeltrxn

Well the main question is whether we want to limit a user to one upload INCLUDING during the conversion time (aka you have a file converting you can't upload another one atm). I suppose we can start with just limiting uploads to one at a time and see if that solves the issue of people overburdening the server. My only fear is that if a file blows up during conversion (say the server reboots) that the person will be stuck on isCurrentlyUploading til the end of time. We can look at that though otherwise I say I love your spec it's the same as what I'd do as well!

mayeaux avatar May 22 '20 01:05 mayeaux

I'm having some trouble with this. I was thinking of pushing some code but I don't have access to the repository

Mxchaeltrxn avatar May 31 '20 04:05 Mxchaeltrxn