File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
frontend/src/components/files Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -38,6 +38,9 @@ type FileActionsMenuProps = {
3838
3939export const FileActionsMenu = ( props : FileActionsMenuProps ) : JSX . Element => {
4040 const { fileId, datasetId, setSelectedVersion } = props ;
41+ const selectedFileVersion = useSelector (
42+ ( state : RootState ) => state . file . selected_version_num
43+ ) ;
4144
4245 const [ anchorEl , setAnchorEl ] = React . useState < null | HTMLElement > ( null ) ;
4346 const [ fileShareModalOpen , setFileShareModalOpen ] = useState ( false ) ;
@@ -158,7 +161,7 @@ export const FileActionsMenu = (props: FileActionsMenuProps): JSX.Element => {
158161 type : INCREMENT_FILE_DOWNLOADS ,
159162 receivedAt : Date . now ( ) ,
160163 } ) ;
161- window . location . href = `${ config . hostname } /api/v2/files/${ fileId } ` ;
164+ window . location . href = `${ config . hostname } /api/v2/files/${ fileId } ?version= ${ selectedFileVersion } ` ;
162165 } }
163166 endIcon = { < Download /> }
164167 >
You can’t perform that action at this time.
0 commit comments