[Loris-dev] Imaging Uploader Failing File Verification

Nicolas Brossard nicolasbrossard.mni at gmail.com
Fri Jul 24 12:02:55 EDT 2020


Hi Eli,

Looking at what is being passed to $file->setHandlerArgs, I can see that
the upload error code is set to 7, which means that the system could not
copy your file in the temporary directory dedicated to uploading files on
the server. By default, uploaded files are written in /tmp, but you can
override this by setting variable TMPDIR in <LORIS_MRI_ROOT>/environment. I
would check that whichever directory you are uploading to has enough free
space to allow the upload and that user www-data has write permission on
that directory.

Let me know if that fixes the issue.

Best,
Nicolas

On Thu, Jul 23, 2020 at 11:50 PM Eli Johnson <joh17964 at umn.edu> wrote:

> Hi,
>
> Using LORIS v23.0 on RHEL 7, accessing LORIS front end from Chrome.
>
> I'm currently setting up the LORIS-MRI and imaging modules for LORIS. I am
> running into an issue with the Imaging Uploader on the front end where it
> is returning the error message "The file TEST111_986793_testing1.zip is
> not of type .tgz, .tar.gz or .zip." When checking the error-log from the
> back end I'm seeing...
>
> PHP Warning:  mime_content_type(): Empty filename or path in
> /<basepath>/modules/imaging_uploader/php/imaging_uploader.class.inc on line
> 646, referer: http://<site>/imaging_uploader
>
>
> Upon further investigation into imaging_uploader.class.inc, the function
> isCompressed() is being passed an empty string from isValid(). IsValid is
> passing it $temp_file, defined in $temp_file=$file->fileInfo['tmp_name'],
> but this is also an empty string. So I'm trying to figure out at what stage
> 'tmp_name' should be defined for $file->fileInfo but I am struggling to
> track it down. I checked what was being passed in $file->setHandlerArgs and
> it contains this:
>
> Array
> (
>     [IsPhantom] => N
>     [candID] => 986793
>     [pSCID] => TEST111
>     [visitLabel] => testing1
>     [mriFile] => Array
>         (
>             [name] => TEST111_986793_testing1.zip
>             [type] =>
>             [tmp_name] =>
>             [error] => 7
>             [size] => 0
>         )
> )
>
>
> Any suggestions on how to get the uploader working? I have verified that
> the MRIUploadIncomingPath variable is set appropriately and is an existing,
> writable directory. I also am able to successfully upload the same zip file
> from the back end.
>
>
> Thanks,
> Eli
>
>
> Eli Johnson
> Developer/Researcher
> Institute of Child Development
> University of Minnesota
> joh17964 at umn.edu
> _______________________________________________
> Loris-dev mailing list
> Loris-dev at bic.mni.mcgill.ca
> https://mailman.bic.mni.mcgill.ca/mailman/listinfo/loris-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.bic.mni.mcgill.ca/pipermail/loris-dev/attachments/20200724/6fba8cb0/attachment.html>


More information about the Loris-dev mailing list