Web: Client: corrected getting the URL to view media
This commit is contained in:
parent
429044ea05
commit
2b32cec11a
@ -6,6 +6,7 @@ import queryString from "query-string";
|
||||
import MediaViewer from "@docspace/common/components/MediaViewer";
|
||||
import { PluginFileType } from "SRC_DIR/helpers/plugins/constants";
|
||||
import { MEDIA_VIEW_URL } from "@docspace/shared/constants";
|
||||
import { combineUrl } from "@docspace/shared/utils/combineUrl";
|
||||
|
||||
const FilesMediaViewer = (props) => {
|
||||
const {
|
||||
@ -107,7 +108,8 @@ const FilesMediaViewer = (props) => {
|
||||
};
|
||||
|
||||
const onChangeUrl = (id) => {
|
||||
const url = MEDIA_VIEW_URL + id;
|
||||
const url = combineUrl(MEDIA_VIEW_URL, id);
|
||||
|
||||
setCurrentId(id);
|
||||
navigate(url);
|
||||
};
|
||||
|
@ -2201,7 +2201,7 @@ class FilesActionStore {
|
||||
);
|
||||
setMediaViewerData({ visible: true, id });
|
||||
|
||||
const url = MEDIA_VIEW_URL + id;
|
||||
const url = combineUrl(MEDIA_VIEW_URL, id);
|
||||
|
||||
if (this.publicRoomStore.isPublicRoom) return;
|
||||
|
||||
|
@ -2952,7 +2952,7 @@ class FilesStore {
|
||||
const url = getCategoryUrl(this.categoryType, id);
|
||||
|
||||
if (canOpenPlayer) {
|
||||
return combineUrl(proxyURL, config.homepage, `${url}/${id}`);
|
||||
return combineUrl(proxyURL, config.homepage, url, id);
|
||||
}
|
||||
|
||||
if (isFolder) {
|
||||
|
@ -6,6 +6,7 @@ import {
|
||||
} from "@docspace/common/components/MediaViewer/helpers";
|
||||
import { thumbnailStatuses } from "SRC_DIR/helpers/filesConstants";
|
||||
import { MEDIA_VIEW_URL } from "@docspace/shared/constants";
|
||||
import { combineUrl } from "@docspace/shared/utils/combineUrl";
|
||||
|
||||
const FirstUrlKey = "isFirstUrl";
|
||||
|
||||
@ -77,7 +78,7 @@ class MediaViewerDataStore {
|
||||
changeUrl = (id) => {
|
||||
if (this.publicRoomStore.isPublicRoom) return;
|
||||
|
||||
const url = MEDIA_VIEW_URL + id;
|
||||
const url = combineUrl(MEDIA_VIEW_URL, id);
|
||||
window.DocSpace.navigate(url);
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user