Expand my Community achievements bar.

SOLVED

Dam files download issue in publish instance

Avatar

Level 2

Hi everyone,

I have facing one issue like Dam assets files unable to downloads in publish env which name given as space ex: (lines OS IT.pdf) same as downloading in Author env. can any one tell what is the issue hear 

Below dispatcher rules using :
>RewriteCond %{REQUEST_URI} !^\/content\/dam\/projectname\/project-xyz\/ [NC]

> RewriteCond %{REQUEST_URI} !^\/content\/dam\/projectname\/project-xyz\/ [NC]

1 Accepted Solution

Avatar

Correct answer by
Employee

Handling AEM asset URLs with spaces when using the Dispatcher can be challenging because spaces in URLs can lead to various issues with caching and routing. When AEM assets have spaces in their names, they may be encoded with "%20" or replaced with other characters in the URL. Here are some steps you can take to handle AEM asset URLs with spaces when using the Dispatcher:

  1. Proper Asset Naming: When creating assets in AEM, ensure that they have proper names without spaces or special characters. Use hyphens or underscores to separate words in asset names instead of spaces.

  2. URL Rewriting on AEM: Configure AEM to handle URL rewriting and replace spaces with hyphens or other characters before generating URLs. AEM can be configured to replace spaces with "-" or a custom character using the Day CQ Link Checker Transformer configuration. This can help avoid spaces in the URLs from the source.

  3. URL Encoding: When the asset URLs with spaces are encoded, ensure that the encoding is done correctly. Spaces are typically encoded as "%20" in URLs. Verify that the URLs are properly encoded in AEM before they reach the Dispatcher.

View solution in original post

3 Replies

Avatar

Employee

what is the error you are getting ? is dispatcher blocking this ? have you checked the logs of publish and dispatcher ?

Avatar

Correct answer by
Employee

Handling AEM asset URLs with spaces when using the Dispatcher can be challenging because spaces in URLs can lead to various issues with caching and routing. When AEM assets have spaces in their names, they may be encoded with "%20" or replaced with other characters in the URL. Here are some steps you can take to handle AEM asset URLs with spaces when using the Dispatcher:

  1. Proper Asset Naming: When creating assets in AEM, ensure that they have proper names without spaces or special characters. Use hyphens or underscores to separate words in asset names instead of spaces.

  2. URL Rewriting on AEM: Configure AEM to handle URL rewriting and replace spaces with hyphens or other characters before generating URLs. AEM can be configured to replace spaces with "-" or a custom character using the Day CQ Link Checker Transformer configuration. This can help avoid spaces in the URLs from the source.

  3. URL Encoding: When the asset URLs with spaces are encoded, ensure that the encoding is done correctly. Spaces are typically encoded as "%20" in URLs. Verify that the URLs are properly encoded in AEM before they reach the Dispatcher.