Skip to Content
Former Member
Jun 19, 2014 at 11:34 AM

What is the significance of the "attachment=true" in the download URL for media in WCMS ?


We have migrated our application from hybris 4.4 to hyrbis 5.1. The download URL for any media in WCMS is like , "/medias/sys_master/8802742894622/hppromo-2014colorofyear.png&attachment=true" As a result, the media is not getting downloaded unless one should remove "attachment=true" manually. The class LocalMediaWebURLStrategy contains following method :

public String getDownloadUrlForMedia(MediaStorageConfigService.MediaFolderConfig config, MediaSource mediaSource) { StringBuilder url = new StringBuilder(getUrlForMedia(config, mediaSource)); if (this.prettyUrlEnabled) { url.append("?"); } else { url.append("&"); } url.append("attachment").append("=").append("true"); return url.toString(); }

Will it cause any other functionality to break if we remove the "attachement=true" by overriding the same method ? What is the significance of the same ?