-
Notifications
You must be signed in to change notification settings - Fork 175
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[DICOM Archive] Add download tar functionality #2967
Conversation
unrelated to these changes but line 120 of get_file.php has incorrect |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Thanks @ZainVirani. It's corrected here |
Discussed at the working group today, no more pull request to 17.1 at this late stage, moved to 17.2 |
@davidblader Is this ready for re-review? |
@HenriRabalais yeah should be good to go 👍 |
Worked fine on my sandbox 👍 |
htdocs/mri/jiv/get_file.php
Outdated
// LORIS-MRI pipeline, identify it as $FileExt: "DICOMTAR" | ||
// Caveat: this is not a real file extension, but a LORIS-MRI | ||
// convention to identify archived DICOMs | ||
if (strpos($File, "DCM_") !== false) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably nitpicking here but shouldn't the validation be performed on the file's base name? And shouldn't we also validate that 'DCM_' occurs at the very beginning of the file's base name?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nicolasbrossard
it is not at the beginning of the filename. DCM_
is usually preceded by the year directory (@driusan had the same comment on another pull request that does similar changes).
If we use the basename; then we can check that DCM_
happens at the beginning.
htdocs/mri/jiv/get_file.php
Outdated
|
||
// Basic config validation | ||
$imagePath = $paths['imagePath']; | ||
$DownloadPath = $paths['DownloadPath']; | ||
$mincPath = $paths['mincPath']; | ||
$tarchivePath = $pipeline['tarchiveLibraryDir']; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should probably check (below) that this setting is not empty.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works great!! 😀
htdocs/mri/jiv/get_file.php
Outdated
error_log("ERROR: Config settings are missing"); | ||
header("HTTP/1.1 500 Internal Server Error"); | ||
exit(1); | ||
} | ||
|
||
if ($imagePath === '/' || $DownloadPath === '/' || $mincPath === '/') { | ||
if ($imagePath === '/' || $DownloadPath === '/' | ||
|| $mincPath === '/' || tarchivePath === '/' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this be $tarchivePath === '/'
(missing $
) ?
@nicolasbrossard fixed, please re/review |
https://redmine.cbrain.mcgill.ca/issues/9865
current display of download link
will need changes made on #2649
get_file.php changes taken from #2791
adding Needs Work until these dependencies are resolved