-
Notifications
You must be signed in to change notification settings - Fork 1
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
Connect download all button in filemngr to zip streamer and log. #1475
Connect download all button in filemngr to zip streamer and log. #1475
Conversation
src/Controller/Api/FileManager.php
Outdated
$dataset = $datasetSubmission->getDataset(); | ||
$udi = $dataset->getUdi(); | ||
// Only log if this is downloaded from dataland. We don't log review downloads. | ||
if ($request->headers->get('referer') and preg_match("/^.*\/data\/$udi$/", $request->headers->get('referer'))) { |
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.
Make a variable for Referer, it's at least being used twice.
src/Controller/Api/FileManager.php
Outdated
@@ -323,70 +326,35 @@ public function downloadFile(File $file, Datastore $datastore): Response | |||
* | |||
* @return Response | |||
*/ | |||
public function downloadZipAllFiles(DatasetSubmission $datasetSubmission): Response | |||
public function downloadZipAllFiles(DatasetSubmission $datasetSubmission, LogActionItemEventDispatcher $logActionItemEventDispatcher, Request $request): Response |
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.
The docblock can be fixed up some. Order, remove unneeded (or add) params. @route should be last.
Also there are no thrown exceptions.
Fixed download all button in file manager So it would show
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.
Reviewed, and ready for release.
hotfix - but we need to discuss "download all" on dataset submission as that is still broke.
Update: it's not an issue on submission because we don't show the button in file mangaer when called from dataset submission. All should be good.