This works nicely and renames my uploaded file but im struggling to make it accept only jpegs under a certain size. Everything I have tried has resulted in me getting an error message that i can only upload a jpeg (yet the file still gets uploaded) or nothing gets uploaded at all even if it is a jpeg. Any help is most appreciated. thank you.

hmm this gives me the error message "File format or size is not supported!"even when it is a jpeg and within the size restrictions - nothing gets uploaded (jpeg or any other format)??Thanks for your help so far.