Asset name with spaces

Avatar

Avatar

deepakt78632031

Avatar

deepakt78632031

deepakt78632031

06-12-2019

Can I upload any asset name with spaces? Would this cause any problems?

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar

Vish_dhaliwal

Employee

Avatar

Vish_dhaliwal

Employee

Vish_dhaliwal
Employee

06-12-2019

It should be okay. However, there were few issues identified because of the space present in the asset name, but those fixes are backported to 6.4 and 6.5.

Regards,

Vishu

Answers (6)

Answers (6)

Avatar

Avatar

Vish_dhaliwal

Employee

Avatar

Vish_dhaliwal

Employee

Vish_dhaliwal
Employee

06-12-2019

What is your AEM version?

It is recommended to be always on the latest service pack to avoid running into known issues.

Avatar

Avatar

sunjot16

Employee

Avatar

sunjot16

Employee

sunjot16
Employee

06-12-2019

You can have assets with spaces in their names.

As far as %2520 is concerned,

The common space character is encoded as %20 . The % character is encoded as %25.

The way you get %2520 is when your url already has a %20 in it, and gets urlencoded again, which transforms the %20 to %2520.

https://stackoverflow.com/questions/16084935/a-html-space-is-showing-as-2520-instead-of-20

As Vish.dhaliwal recommended, you should install latest SP to avoid running into known issues. You can find it here:

AEM 6.4 Service Pack Release Notes

Avatar

Avatar

deepakt78632031

Avatar

deepakt78632031

deepakt78632031

06-12-2019

We are on 6.4.4. However I am worried about any indexing challenges we might get with it.

We ran into a recent issue of resource resolver and Externalizer being used in the same code and they are encoding the path twice. So "abc def.png" is becoming "abc%2520def.png" instead of "abc%20def.png". Do you think that is an issue with code or could possibly be because of the spaces?

Note : We have a lot of assets with spaces? Should we consider renaming them?

Avatar

Avatar

deepakt78632031

Avatar

deepakt78632031

deepakt78632031

06-12-2019

Does this mean I need install any service packs?

Avatar

Avatar

Vish_dhaliwal

Employee

Avatar

Vish_dhaliwal

Employee

Vish_dhaliwal
Employee

06-12-2019

Check the naming conventions here: Naming conventions for assets

Avatar

Avatar

deepakt78632031

Avatar

deepakt78632031

deepakt78632031

06-12-2019

For instance, if the asste name is "abc def.png", Is this okay to upload as is, or should I be changing the name?