Closed gandol2 closed 5 years ago
How to upload Media How to create Tag
after this you can create Post
var post = new Post() {
Tags = new int[] { tagId }, //id of created tag
//path to uploaded image
Content = new Content($"content text with html tags. you can insert image like this <img src =\"{IMAGE_PATH}\" />"),
//any other post properties
}
//create post
await client.Posts.Create(post);
Is this the same sequence?
Same. Create Media method returns you created media object. You can try it all on your site
thank you. i have another question.
how to get image size (with and height)?
when i post content including image, i want to include size information.
created Media object has property MediaDetails of type MediaDetails which has properties Width, Height (and all kind of Sizes). you can find it in out codebase MediaItem MediaDetails
i see. thank you :)
I want to insert the media into the post. With HTML tags ..
Please give us an example.