Skip to content

Problem with CreateMedia (create but in invalid format) #341

@edmilsonlani

Description

@edmilsonlani

I'm testing the library and I managed to create a post correctly, but when I try to create a media, it doesn't work correctly.

It uploads the image to the folder correctly, but it has a different size and a non-image format.

I tested a few methods and they all worked the same way.

if (await client.Auth.IsValidJWTokenAsync())
{
//Stream s = new FileStream(@"C:\Temp\erro_tela.png", FileMode.Open, FileAccess.Read, FileShare.Read);
Stream s = File.OpenRead(@"C:\Temp\erro_tela.png");
var createdMedia = await client.Media.CreateAsync(s, "erro_tela.png");
//var createdMedia = await client.Media.CreateAsync(@"C:\Temp\erro_tela.png", "erro_tela.png");
Console.WriteLine(createdMedia.MimeType);
Console.WriteLine(createdMedia.SourceUrl);
}

This is an image

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