Hi I want to allow users of my application the ability to upload an image when submitting a form. However i also want to perform a check on the image to make sure it is less than the 1MB limit BEFORE trying to put it in the datastore.
I know i could do: try: image.put() except: #its to big but because of the logic of my application I would like to test the size of the image BEFORE attempting to put it in the datastore. I have tried using: size = os.path.getsize(theImage) and size = os.stat(binaryImage)[ST_SIZE] and neither seem to work in the appengine environment. Any ideas? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~----------~----~----~----~------~----~------~--~---