Checking for an existing post when uploading an image