Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

Add New extensions in MIME file-type in AEM

Avatar

Community Advisor

Hi All,

Requirement is to add new extensions in MIME file-type in AEM

 

1. I have added the MIME type configuration ("application/octet-stream vas" and "application/octet-stream apkg") in the OSGi configuration "Apache Sling Commons MIME Type Service".

2. After making the OSGi configuration, we have uploaded the apkg file in DAM asset.

3. We are unable to find the file format (.apkg) from from DAM asset search.

4. I have tried to add similar configuration in httpd.conf dispatcher file - but no luck.

 

Please share your inputs.

 

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

I hope .apkg/.vas extensions are not supported in AEM and We have found the fix for this issue by enabling the configuration in OSGi: Day cq DAM MIME type service . Please review the below details :

Scenerio:1
OSGi configuration in Author -1: Day cq DAM MIME type service - check box enabled
OSGi configuration in Author -2: Apache sling commons MIME trpe service - Added MIME type vas/apkg configuration


1. Upload new asset in DAM console with "application/octet-stream" MIME type and the DAM asset MIME type will get changed to "text/html" (after uploaded the asset)
2. For existing asset which has "application/octet-stream" MIME type - if we initiate the DAM Update Asset workflow for that asset. Then MIME type of the asset gets changed to "text/html" MIME type.
3. When we search for .apkg/.vas extension from Manuscript filter - we are able to see the assets in search result.

Log: when we initiate the DAM update workflow.
mime type [text/html] of asset [/content/dam/abc.apkg] is not in list of accepted mime types [[image/eps, image/x-eps, application/postscript, application/eps, application/x-eps]], ignoring.


Scenerio:2
OSGi configuration in Author -1: Day cq DAM MIME type service - check box disabled
OSGi configuration in Author -2: Apache sling commons MIME trpe service - Added MIME type vas/apkg configuration

1. Upload new asset in DAM console with "application/octet-stream" MIME type and that remains same MIME type.
2. For existing asset which has "application/octet-stream" MIME type - if we initiate the DAM Update Asset workflow for that asset. No change in the MIME type of the asset
3. When we search for .apkg/.vas extension from Manuscript filter - we are unable to see the assets in search result.


Scenerio:3
OSGi configuration in Author -1: Day cq DAM MIME type service - check box enabled
OSGi configuration in Author -2: Apache sling commons MIME trpe service - Removded vas/apkg configuration


1. Upload new asset in DAM console with "application/octet-stream" MIME type and the DAM asset MIME type will get changed to "text/html" (after uploaded the asset)
2. For existing asset which has "application/octet-stream" MIME type - if we initiate the DAM Update Asset workflow for that asset. Then MIME type of the asset gets changed to "text/html" MIME type.
3. When we search for .apkg/.vas extension from Manuscript filter - we are able to see the assets in search result.

Conclusion:
.apkg/.vas assets which has "text/html" MIME type - we are able to see the assets in search result
.apkg/.vas assets which has "application/octet-stream" MIME type - we are unable to see the assets in search result

 

 

View solution in original post

10 Replies

Avatar

Community Advisor

Hi @Raja-kp 

 

I am clear till #2 and you are successfully able to add the OSGi configuration with additional MIME type.

But what are you trying to do by adding same configuration in httpd.conf?

 

What is the issue you are facing? Are you not able to download or view the file?

 

Thanks!

Avatar

Community Advisor

After adding the configuration in OSGi - the file extension didn't appear in the author asset search result. So I have added the similar MIME type configuration in httpd.conf file as well.

Avatar

Level 4

Hi @Raja-kp 

 

Steps followed by you are correct.

 

I checked it on my end and I can see the test.apkg on my end using the assetpicker http://localhost:4502/aem/assetpicker.html or the normal search as well.

Can you check in whatever way you are searching is there any filter for File Type or some other filter in search for which your uploaded file have blank value because I believe in this case you won't see the result

 

Thanks!

 

Avatar

Community Advisor

Yeah - I have searched the file extension with all filter types but it shows blank result.

Avatar

Community Advisor

HI - Metadata type of file is "application/octet-stream" as expected.

Avatar

Level 4

Hi,

Can you overlay this file /libs/cq/gui/components/authoring/editors/clientlibs/core/js/assetController/document/documentController.js and make an entry of your MIME type in this file and then check.

 

Use this new filter for searching the file.

 

Thanks!

Avatar

Community Advisor

@Raja-kp,

.apkg file mimetype is application/octet-stream and I don't think you need to add any configuration. You can directly upload file and AEM should recognize the file extension as application/octet-stream.

Please provide steps that how you are trying to load .apkg files into AEM server? is it through AEM UI upload button ? or anything else? Try to load .apkg file using upload button and note down the file location that you're trying to upload.  Still if is not displayed in the UI then go to crx/de and check your uploaded .apkg file exists at the location that you loaded into DAM. If it does exists then validate metadata properties and mime type. 

 

Avatar

Community Advisor

Thanks Aruna.

We are uploading the assets via DAM console and MIME types are configured as expected. but still we are unable to search the .apkg/.vas extension from search result.

Avatar

Correct answer by
Community Advisor

I hope .apkg/.vas extensions are not supported in AEM and We have found the fix for this issue by enabling the configuration in OSGi: Day cq DAM MIME type service . Please review the below details :

Scenerio:1
OSGi configuration in Author -1: Day cq DAM MIME type service - check box enabled
OSGi configuration in Author -2: Apache sling commons MIME trpe service - Added MIME type vas/apkg configuration


1. Upload new asset in DAM console with "application/octet-stream" MIME type and the DAM asset MIME type will get changed to "text/html" (after uploaded the asset)
2. For existing asset which has "application/octet-stream" MIME type - if we initiate the DAM Update Asset workflow for that asset. Then MIME type of the asset gets changed to "text/html" MIME type.
3. When we search for .apkg/.vas extension from Manuscript filter - we are able to see the assets in search result.

Log: when we initiate the DAM update workflow.
mime type [text/html] of asset [/content/dam/abc.apkg] is not in list of accepted mime types [[image/eps, image/x-eps, application/postscript, application/eps, application/x-eps]], ignoring.


Scenerio:2
OSGi configuration in Author -1: Day cq DAM MIME type service - check box disabled
OSGi configuration in Author -2: Apache sling commons MIME trpe service - Added MIME type vas/apkg configuration

1. Upload new asset in DAM console with "application/octet-stream" MIME type and that remains same MIME type.
2. For existing asset which has "application/octet-stream" MIME type - if we initiate the DAM Update Asset workflow for that asset. No change in the MIME type of the asset
3. When we search for .apkg/.vas extension from Manuscript filter - we are unable to see the assets in search result.


Scenerio:3
OSGi configuration in Author -1: Day cq DAM MIME type service - check box enabled
OSGi configuration in Author -2: Apache sling commons MIME trpe service - Removded vas/apkg configuration


1. Upload new asset in DAM console with "application/octet-stream" MIME type and the DAM asset MIME type will get changed to "text/html" (after uploaded the asset)
2. For existing asset which has "application/octet-stream" MIME type - if we initiate the DAM Update Asset workflow for that asset. Then MIME type of the asset gets changed to "text/html" MIME type.
3. When we search for .apkg/.vas extension from Manuscript filter - we are able to see the assets in search result.

Conclusion:
.apkg/.vas assets which has "text/html" MIME type - we are able to see the assets in search result
.apkg/.vas assets which has "application/octet-stream" MIME type - we are unable to see the assets in search result