Stunts Forum

Stunts - the Game => Stunts Related Programs => Topic started by: dreadnaut on February 13, 2019, 09:32:29 AM

Title: [idea] Replay auto-upload
Post by: dreadnaut on February 13, 2019, 09:32:29 AM
I was thinking about live races while having breakfast, and this came to my mind. I'll dump it here, not to forget.

Uploading a replay for a race is a multi-step operation, nothing too long, but seconds! are really important at the end of a live race. So what if there was a little program that looks at the Stunts directory, and every time a .RPL file is created or modified, it uploads it to ZakStunts?

The website should have an endpoint to allow automated uploads, and keep only the most recent 15-20 replays to save space. pipsqueaks would have a new page with a list of their uploaded replays, and the option to Publish, Download, or Delete each.

Bonus, a "Team mode" where the list is shared among the members of the team.
Title: Re: [idea] Replay auto-upload
Post by: afullo on February 14, 2019, 10:30:50 AM
I don't know if it would be compliant with new European privacy regulations ( ;D ), but for the rest it is a great idea.  8)
Title: Re: [idea] Replay auto-upload
Post by: Cas on February 18, 2019, 11:22:38 PM
I figure this could even grow to become a non-web client and a Stunts community protocol. In the meantime, an area on the website where you could "drop" the replay file could be fast enough; at least, much faster than what we've been doing so far, I guess.

I have more ideas regarding this "protocol", but I think they are out of scope in this thread. I'll write about it separately.
Title: Re: [idea] Replay auto-upload
Post by: dreadnaut on February 19, 2019, 08:53:22 PM
Quote from: Cas on February 18, 2019, 11:22:38 PM
In the meantime, an area on the website where you could "drop" the replay file could be fast enough

Note that if you drop a file on the "Browse" button of the upload form, it will be selected for you. That's standard in all desktop browsers, as far as I know.

For R4K, you could add the accept attribute to limit the file shown in the selector:

<input type="file" name="replay" accept=".rpl" />
Title: Re: [idea] Replay auto-upload
Post by: Cas on February 20, 2019, 07:02:15 AM
Ah!  I must remember to do that when I modify the code again. It does verify that the extension be RPL when you've already selected it, but true, the list shows all files.