Skip to content

Commit 20fbed8

Browse files
committed
Bug #14784
Take into account the download of files is now the only and default behavior in Silverpeas when serving files.
1 parent 1145a28 commit 20fbed8

File tree

4 files changed

+224
-246
lines changed

4 files changed

+224
-246
lines changed

gallery/gallery-library/src/main/java/org/silverpeas/components/gallery/constant/GalleryResourceURIs.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ public final class GalleryResourceURIs {
4242
public static final String GALLERY_ALBUMS_URI_PART = "albums";
4343
public static final String GALLERY_PHOTOS_PART = "photos";
4444
public static final String GALLERY_PHOTO_RESOLUTION_PARAM = "resolution";
45-
public static final String GALLERY_DOWNLOAD_CONTEXT_PARAM = "downloadContext";
4645
public static final String GALLERY_VIDEOS_PART = "videos";
4746
public static final String GALLERY_SOUNDS_PART = "sounds";
4847
public static final String GALLERY_MEDIA_CONTENT_PART = "content";
@@ -101,7 +100,7 @@ public static URI buildMediaContentURI(Media media, MediaResolution mediaResolut
101100
return null;
102101
}
103102
UriBuilder uriBuilder = SilverpeasWebResource.getBasePathBuilder().path(GALLERY_BASE_URI)
104-
.path(media.getComponentInstanceId()).path(media.getType().getMediaWebUriPart())
103+
.path(media.getInstanceId()).path(media.getType().getMediaWebUriPart())
105104
.path(media.getId()).path(GALLERY_MEDIA_CONTENT_PART)
106105
.queryParam("_t", media.getLastUpdateDate().getTime());
107106
if (mediaResolution != null && mediaResolution != MediaResolution.ORIGINAL) {
@@ -121,7 +120,7 @@ public static URI buildMediaEmbedURI(Media media, MediaResolution mediaResolutio
121120
return null;
122121
}
123122
UriBuilder uriBuilder = SilverpeasWebResource.getBasePathBuilder().path(GALLERY_BASE_URI)
124-
.path(media.getComponentInstanceId()).path(media.getType().getMediaWebUriPart())
123+
.path(media.getInstanceId()).path(media.getType().getMediaWebUriPart())
125124
.path(media.getId()).path(GALLERY_MEDIA_EMBED_PART);
126125
if (mediaResolution != null && mediaResolution != MediaResolution.ORIGINAL) {
127126
uriBuilder.queryParam(GALLERY_PHOTO_RESOLUTION_PARAM, mediaResolution);
@@ -141,7 +140,7 @@ public static URI buildVideoThumbnailURI(Media media, ThumbnailPeriod thumbnail)
141140
}
142141
UriBuilder uriBuilder =
143142
SilverpeasWebResource.getBasePathBuilder().path(GALLERY_BASE_URI)
144-
.path(media.getComponentInstanceId()).path(media.getType().getMediaWebUriPart())
143+
.path(media.getInstanceId()).path(media.getType().getMediaWebUriPart())
145144
.path(media.getId()).path(GALLERY_MEDIA_THUMBNAIL_PART)
146145
.path(Integer.toString(thumbnail.getIndex()))
147146
.queryParam("_t", media.getLastUpdateDate().getTime());

0 commit comments

Comments
 (0)