This is handled on the server. You're using unnecessary storage, with an unlimited upper limit. Delete this logic.