There are plenty of free/paid/opensource filehost scripts, why not editing them to suit your needs?

Your current idea will be costly.