Skip to content
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

[imaging uploader] error 500 when uploading file bigger than 1 GB #8707

Closed
regisoc opened this issue May 15, 2023 · 2 comments
Closed

[imaging uploader] error 500 when uploading file bigger than 1 GB #8707

regisoc opened this issue May 15, 2023 · 2 comments
Assignees
Labels
25.0.0 - Bugs Bug PR or issue introducing/requiring bug fixes (not mutually exclusive with the Feature label)

Comments

@regisoc
Copy link
Contributor

regisoc commented May 15, 2023

Describe the bug

==> EDIT: find out my VM has no space left. This issue might be linked to that.

When uploading a compressed file that is more than 1 GB uncompressed in .tar.gz format, a 500 error is generated as such:

Screenshot_2023-05-14_20-43-33

To Reproduce
Steps to reproduce the behavior (attach screenshots if applicable):

  1. Go to menu > imaging > imaging uploader
  2. Go to upload tab
  3. Fill out as Phantom scan = no and try uploading a folder bigger than is larger than 1 GB when uncompressed
  4. See error

The backend access gives this error in the logs:

[php:error] [pid 24198] [client ::1:40792] PHP Fatal error:  Uncaught ValueError: mime_content_type(): Argument #1 ($filename) cannot be empty in /var/www/Loris/modules/imaging_uploader/php/imaging_uploader.class.inc:644
Stack trace:
#0 /var/www/Loris/modules/imaging_uploader/php/imaging_uploader.class.inc(644): mime_content_type()
#1 /var/www/Loris/modules/imaging_uploader/php/imaging_uploader.class.inc(296): LORIS\\imaging_uploader\\Imaging_Uploader->isCompressed()
#2 /var/www/Loris/php/libraries/File_Upload.class.inc(220): LORIS\\imaging_uploader\\Imaging_Uploader->isValid()
#3 /var/www/Loris/php/libraries/File_Upload.class.inc(110): File_Upload->callFileHandler()
#4 /var/www/Loris/modules/imaging_uploader/php/imaging_uploader.class.inc(252): File_Upload->processFiles()
#5 /var/www/Loris/modules/imaging_uploader/php/imaging_uploader.class.inc(149): LORIS\\imaging_uploader\\Imaging_Uploader->_saveFile()
#6 /var/www/Loris/php/libraries/NDB_Menu_Filter_Form.class.inc(82): LORIS\\imaging_uploader\\Imaging_Uploader->_process()
#7 /var/www/Loris/php/libraries/LorisForm.class.inc(1453): NDB_Menu_Filter_Form->_save()
#8 /var/www/Loris/php/libraries/NDB_Menu_Filter_Form.class.inc(50): LorisForm->process()
#9 /var/www/Loris/php/libraries/NDB_Menu_Filter_Form.class.inc(110): NDB_Menu_Filter_Form->save()
#10 /var/www/Loris/src/Middleware/UserPageDecorationMiddleware.php(239): NDB_Menu_Filter_Form->handle()
#11 /var/www/Loris/src/Middleware/PageDecorationMiddleware.php(58): LORIS\\Middleware\\UserPageDecorationMiddleware->process()
#12 /var/www/Loris/php/libraries/NDB_Page.class.inc(725): LORIS\\Middleware\\PageDecorationMiddleware->process()
#13 /var/www/Loris/php/libraries/Module.class.inc(328): NDB_Page->process()
#14 /var/www/Loris/src/Middleware/ResponseGenerator.php(50): Module->handle()
#15 /var/www/Loris/src/Middleware/AuthMiddleware.php(63): LORIS\\Middleware\\ResponseGenerator->process()
#16 /var/www/Loris/src/Router/ModuleRouter.php(74): LORIS\\Middleware\\AuthMiddleware->process()
#17 /var/www/Loris/src/Middleware/ExceptionHandlingMiddleware.php(54): LORIS\\Router\\ModuleRouter->handle()
#18 /var/www/Loris/src/Router/BaseRouter.php(132): LORIS\\Middleware\\ExceptionHandlingMiddleware->process()
#19 /var/www/Loris/src/Middleware/ResponseGenerator.php(50): LORIS\\Router\\BaseRouter->handle()
#20 /var/www/Loris/src/Middleware/ContentLength.php(52): LORIS\\Middleware\\ResponseGenerator->process()
#21 /var/www/Loris/htdocs/index.php(55): LORIS\\Middleware\\ContentLength->process()
#22 {main}
  thrown in /var/www/Loris/modules/imaging_uploader/php/imaging_uploader.class.inc on line 644, referer: http://localhost:8080/imaging_uploader/

Should probably be tested here

What did you expect to happen?

If that is linked to the file size, a clear message for the user to say that the file is too big to process.

@regisoc regisoc added Bug PR or issue introducing/requiring bug fixes (not mutually exclusive with the Feature label) 25.0.0 - Bugs labels May 15, 2023
@regisoc regisoc closed this as completed May 15, 2023
@regisoc regisoc reopened this May 15, 2023
@regisoc regisoc mentioned this issue May 16, 2023
15 tasks
@driusan
Copy link
Collaborator

driusan commented May 30, 2023

@regisoc since according to the edit you need a VM without space to duplicate this, I'm assigning it to you. I don't think anyone else has the pre-requisites. (I think that, in general, there should already be an error if it's because of the php configuration limits, so this is likely only because of the filesystem space.)

@regisoc
Copy link
Contributor Author

regisoc commented Jun 5, 2023

@driusan cannot reproduce, seems the space was the issue.

@regisoc regisoc closed this as completed Jun 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
25.0.0 - Bugs Bug PR or issue introducing/requiring bug fixes (not mutually exclusive with the Feature label)
Projects
None yet
Development

No branches or pull requests

2 participants