Grails file upload - how to recognize file and/or content type?
问题 I'm a Grails beginner, so please be patient with me. Currently I'm having hard times manipulating file uploads. As far as I understand using request.getFile() I can easily get the stream of bytes. But before I do that, I want to check the following: file name of the file being uploaded file size of the file being uploaded content/file type of the file being uploaded How can this be done? Is it even possible before the file is uploaded to the server? I would like to block uploading of large