Fix generate thumbs on upload for Amazon S3