My guess is you need to provide a little bit more information for your question :-)
I’ll assume you want to limit the uploads of documents to 300KB…
It’s possible to set a limit to the upload size, however, you can only use increments of 1MB.
You could however add an additional check after the upload has been done (the part where you save the file or do something with its contents):
But if you mean something else, ignore this comment ;-)