Skip to content

ImageContent has no option (uri, mimeType) ? #9541

Closed Answered by RogerBarreto
apipino asked this question in Q&A
Discussion options

You must be logged in to vote

@apipino There are 3 constructors as you can see in the thread.

  • ImageContent(ReadOnlyMemory, String mimeType)
    This should be used when you have the Binary information of your image with the mimeType provided

  • ImageContent(String dataUri)
    This should be used when you have a base64 binary representation of your image (data-uri)

  • ImageContent(Uri)
    This should be used when your image is external, provided by a valid public internet address

That said, analyzing your problem, you should be using the Uri constructor and providing the mimeType as a property.

i.e:

'This should not be a string, use the Uri type constructor (3 option above)
Dim imgUri As Uri = New Uri(Await GoogleUploadMediaFi…

Replies: 8 comments 4 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@Krzysztof318
Comment options

@apipino
Comment options

@apipino
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@apipino
Comment options

Answer selected by sophialagerkranspandey
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
.NET Issue or Pull requests regarding .NET code ai connector Anything related to AI connectors
5 participants