Class LocalMediaWebURLStrategy

  • All Implemented Interfaces:
    MediaURLStrategy

    public class LocalMediaWebURLStrategy
    extends java.lang.Object
    implements MediaURLStrategy
    Url strategy for local mediaweb. Renders URLs in following format:
     /medias/realFilename.jpg?context=base32encodedMediaContext
     
    Spring Bean ID:
    = localMediaWebURLStrategy
    • Constructor Detail

      • LocalMediaWebURLStrategy

        public LocalMediaWebURLStrategy()
    • Method Detail

      • getMediaWebRootContext

        public java.lang.String getMediaWebRootContext()
        Returns media web app context root, e.g. '/medias'
      • getTenantId

        protected java.lang.String getTenantId()
      • getDownloadUrlForMedia

        public java.lang.String getDownloadUrlForMedia​(MediaStorageConfigService.MediaFolderConfig config,
                                                       MediaSource mediaSource)
        Gets the download URL for media. URL contains parameter attachment with value true. This parameter causes that MediaFilter add Content-Disposition header to the HTTP response what forces browser to display download dialog rather than serve media directly.
        Parameters:
        config - media folder configuration
        mediaSource - the media source
        Returns:
        the download URL for media
      • isPrettyUrlEnabled

        protected boolean isPrettyUrlEnabled()
      • setPrettyUrlEnabled

        public void setPrettyUrlEnabled​(boolean prettyUrlEnabled)