Hi Kurli Sathvika
Yes, we can restrict the file size while uploading the document and image.
You can use the file manager widget to upload and download.
Check this document: File manager
Check out this link :
https://docs.mendix.com/howto/data-models/working-with-images-and-files/