内存流中的InvalidOperationException

问题描述

我正在尝试将图像上传到cloudinary云。该文件可以很好地转换为内存流,但是当我尝试调用cloudinary的上载方法上载图像时,出现了InvlalidOperationException。我认为是,将文件转换为流有问题。See the image showing error

sf::Event e;
if (e.type == sf::Event::MouseButtonReleased){
    if (e.mouseButton.button == sf::Mouse::Left){
     //Do something
    }

解决方法

能否请您分享为什么使用开放流?您可以尝试:

var imageuploadParams = new ImageUploadParams () {
                File = new FileDescription (@"https://res.cloudinary.com/demo/image/upload/v1561532539/sample.jpg"),PublicId = "myimage",Transformation = new Transformation().Width(500).Height(500).Crop("fill").Gravity("face")
            };
            var ImageuploadResult = cloudinary.Upload (imageuploadParams);