Skip to content

Commit

Permalink
Review changes
Browse files Browse the repository at this point in the history
  • Loading branch information
laemtl committed Apr 4, 2023
1 parent d99d70f commit b9a71b6
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 12 deletions.
14 changes: 6 additions & 8 deletions modules/electrophysiology_uploader/jsx/UploadViewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,14 +77,12 @@ export default function UploadViewer(props) {
];

return (
<>
<FilterableDataTable
name='eeg_upload_viewer'
data={props.data}
fields={fields}
getFormattedCell={formatColumn}
/>
</>
<FilterableDataTable
name='eeg_upload_viewer'
data={props.data}
fields={fields}
getFormattedCell={formatColumn}
/>
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class Electrophysiology_Uploader extends \DataFrameworkMenu
*/
public function useProjectFilter(): bool
{
return false;
return true;
}

/**
Expand Down
9 changes: 6 additions & 3 deletions modules/electrophysiology_uploader/php/upload.class.inc
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,8 @@ class Upload extends \NDB_Page
if (empty($request->getUploadedFiles()) && empty($values)) {
$upload_max_size = \Utility::getMaxUploadSize();
return new \LORIS\Http\Response\JSON\InternalServerError(
"The uploaded file size ($upload_max_size) exceeds " .
"the upload_max_filesize or post_max_size directive in php.ini"
"The uploaded file size exceeds the upload_max_filesize " .
"or post_max_size directive in php.ini ($upload_max_size)"
);
}

Expand Down Expand Up @@ -176,7 +176,10 @@ class Upload extends \NDB_Page
);
}

// Check for existing files
// Check for an existing file
// If found, add a timestamp suffix to avoid collision
// with any other existing upload attempt
// and move the renamed file in _EEGUploadIncomingPath_/archives/
$targetPath = $targetdir->getPathname() . '/' . $filename;
if (file_exists($targetPath)) {
$archiveFilename = str_replace(
Expand Down

0 comments on commit b9a71b6

Please # to comment.