Skip to content

Upload app logo resulted in Error #745

@ritu-rubrik

Description

@ritu-rubrik

Using the below code to upload an Logo for a given App:

headers := abstractions.NewRequestHeaders()
	headers.Add("Content-Type", "image/jpg")
	configuration := &applications.
		ItemLogoRequestBuilderPutRequestConfiguration{
		Headers: headers,
	}
	appLogo, err := os.ReadFile(appLogoFile)
	resp, err := client.Applications().ByApplicationId(appObjectID).Logo().Put(
		ctx,
		appLogo,
		configuration,
	)

However this results in the below error:
content type text/html does not have a factory registered to be parsed
On debugging further it was found that the APi call results in a a Bad Request 400 erro and the same is getting set in response body resulting in above error.
Looks like Content-tye is set to 2 values image/jpeg and application/octet-stream . Not sure if this is causeing the request to the MS graph API to fail

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