ID:2407252
 
(See the best response by Kaiochao.)
Is there any way possible to scrape the meta data of a file before its loaded to the server?

Basically, I am allowing players to set their own theme song. I'm currently doing this by letting players use a video from youtube and opening it in a hidden window so that it doesn't actually impact the server, and using the embedded player so that it doesn't play ads.

The problem with this being that certain videos aren't usable in the embedded player and you cant control the volume of the video via coding.

Im doing all of this because players uploading audio files is always a good way to crash a server. When someone sends an hour long uncompressed .wav file or something like that instead of a nice short .ogg file.

So my question is... is there a way to scrape a file's file size before having the server load the file from the player? Like... check if the file is under 200 kb first, and if it is, then receive the file from the player.
Best response
client/AllowUpload