Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

Assets API Update Rendition Mime Type

Avatar

Avatar
Boost 1
Level 1
btaymaz
Level 1

Likes

2 likes

Total Posts

15 posts

Correct Reply

2 solutions
Top badges earned
Boost 1
Validate 1
Affirm 1
View profile

Avatar
Boost 1
Level 1
btaymaz
Level 1

Likes

2 likes

Total Posts

15 posts

Correct Reply

2 solutions
Top badges earned
Boost 1
Validate 1
Affirm 1
View profile
btaymaz
Level 1

20-05-2021

We migrated our assets from another system. Some file extension are not formatted correctly, like "filename.jpg (1)". AEM couldn't figured out mime type, so DAM Update Asset workflow couldn't generate renditions.

 

I tried to add mime type manually via Assets API but I'm getting "Forbidden" error. Any ideas?

 

Spoiler
PUT /api/assets/myfolder/myAsset.png/renditions/original -H"Content-Type: application/json" -d '{"properties":{"jcr:mimeType":"image/jpeg"}}'

 

 

Accepted Solutions (0)

Answers (2)

Answers (2)

Avatar

Avatar
Coach
MVP
Arun_Patidar
MVP

Likes

1,358 likes

Total Posts

3,228 posts

Correct Reply

918 solutions
Top badges earned
Coach
Contributor 2
Ignite 10
Give Back 700
Boost 1000
View profile

Avatar
Coach
MVP
Arun_Patidar
MVP

Likes

1,358 likes

Total Posts

3,228 posts

Correct Reply

918 solutions
Top badges earned
Coach
Contributor 2
Ignite 10
Give Back 700
Boost 1000
View profile
Arun_Patidar
MVP

20-05-2021

Please check https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager-assets/assets-6-4-http-api...

If it is Author, you may need to use credentials to connect.

 

Avatar

Avatar
Give Back 100
Level 10
asutosh_jena
Level 10

Likes

570 likes

Total Posts

687 posts

Correct Reply

197 solutions
Top badges earned
Give Back 100
Boost 500
Affirm 100
Ignite 1
Establish
View profile

Avatar
Give Back 100
Level 10
asutosh_jena
Level 10

Likes

570 likes

Total Posts

687 posts

Correct Reply

197 solutions
Top badges earned
Give Back 100
Boost 500
Affirm 100
Ignite 1
Establish
View profile
asutosh_jena
Level 10

20-05-2021

Hi @btaymaz 

 

You can try in the below way:

  1. Use the PUT request with the asset URL e.g. http://localhost:4502/api/assets/wknd-events/wknd-events.jpg
  2. Set the Authorization type as "Basic Auth" with username and password.
  3. Set the "Content-Type" header as "application/json".
  4. Use the below request body:
{
"properties": {
"metadata" : {
"dam:MIMEtype":"image/jpeg"
}
}
}

 

This will set the mime type on metadata node.

 

Hope this helps!

Thanks