mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-10 11:21:29 +00:00
repair code bug (#4497)
This commit is contained in:
@@ -50,9 +50,10 @@ class FileContent extends React.Component {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// get image path
|
// get image path
|
||||||
let index = imageUrl.indexOf('/file');
|
let imagePath = imageUrl.substring(serviceURL.length);
|
||||||
let index2 = imageUrl.indexOf('?');
|
let index = imagePath.indexOf('/file');
|
||||||
const imagePath = imageUrl.substring(index + 5, index2);
|
let index2 = imagePath.indexOf('?');
|
||||||
|
imagePath = imagePath.substring(index + 5, index2);
|
||||||
// change image url
|
// change image url
|
||||||
innerNode.data.src = serviceURL + '/view-image-via-share-link/?token=' + sharedToken + '&path=' + imagePath;
|
innerNode.data.src = serviceURL + '/view-image-via-share-link/?token=' + sharedToken + '&path=' + imagePath;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user