cleaned up upload_post api method