Skip to content

[iOS] headers bug #27

@stesvis

Description

@stesvis

Hello,

I am using the plugin to upload an image and it works perfectly in android, but in iOS i always get status code 422 and "Unprocessable entity".

Any idea?

var token = await SecureStorage.GetAsync(SecureStorageProperties.AuthToken);

                var uploadUrl = $"{ApiUrls.VLBaseUrl}{ApiUrls.VL.Images.Upload}";
                var uploadResponse = await CrossFileUploader.Current.UploadFileAsync(
                    uploadUrl,
                    new FilePathItem("image", filePath),
                    new Dictionary<string, string>()
                    {
                        {"Accept" , $"application/vnd.api+json, application/vnd.spinlister; v=7"},
                        {"Device-Kind" , Device.RuntimePlatform.ToLower()},
                        {"Auth-Token", token},
                    },
                    new Dictionary<string, string>()
                    {
                        { "holder-id", holderId.ToString() },
                        { "type", type },
                        { "extension", extension },
                    }
                );

I am using the latest version v1.4.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions