Description
Hello,
this is a request and an issue for some i guess.
In Parse Server, anybody (even a non-user client) can upload files to the server and this is quite uncontrolled.
My story is: I myself wrote a cloud function for uploading photos, it takes base64 photo, saves it and its 40x40 thumbnail and create a Photo object which holds these two files and a pointer to the user. This way, I can use the Photo object anywhere I like and also I know which user has made which upload. This also lets me be able to track every files in my system and whenever some of the Photo objects are not pointed anymore, I can delete those files they include, from my s3 bucket. This method opts to give me full control over the file uploads.
Although I tried very hard and made this system, still any clients who create a Parse.File themselves can upload it to the system :(
Long story short, any developer who might need some control over the file upload or at least wish to bookkeep the uploads, might find handy to use beforeSave and afterSave triggers for Parse.File class. How do you think of this suggestion? Is there any other mechanism or workaround to solve this "uncontrolled upload" problem?