EPrints Technical Mailing List Archive

Message: #09120


< Previous (by date) | Next (by date) > | < Previous (in thread) | Next (in thread) > | Messages - Most Recent First | Threads - Most Recent First

Re: [EP-tech] Main/filename not set in staging area


Hi James,

Having a look at File.pm and URL.pm in 3.4.4, the only change for File.pm since the initial 3.4 import that relates to how files upload is some code that strips out trailing and leading spaces before the file is saved to disk and its filename saved to the database.  There is no such change for URL.pm. 

One thing that has been altered about file uploads to help deal with problematic filenames is in perl_lib/EPrints/Plugin/Storage/Local.pm.  This change allowed files to be renamed to <fileid>.bin on disk and EPrints would check this as a secondary filename if it could not find the file under its recorded filename in the database.  The mismatch may have been due to a special character being transposed differently in the database to the filesystem, the previous leading/trailing spaces issue or some other problem.  There is a setting ($c->{generic_filenames}) which is disabled by default but if enabled would save files to disk as <fileid>.bin in future rather than the original filename.  This was first implemented for EPrints 3.4.3.

None of what I describe above seems like it would lead to the specific issue you are reporting.  I am assuming that Staging.pm was based on File.pm at some point in the past.  If this diverged pre-3.4 then there may have been other changes between 3.3 and 3.4.

Regards

David Newman

On 08/12/2022 12:30, James Kerwin via Eprints-tech wrote:
CAUTION: This e-mail originated outside the University of Southampton.
Hi All,

Once again I've done something to our poor Data Repository. We're on EPrints 3.4.4.

If we upload files the "normal" way they go on with no problem.

If we do an upload of files over 4GB in our "Staging Area" then "Main" is not set in the Documents database table. I'm almost certain that this is something specific to my repository as we have some slightly different files in:

/usr/share/eprints/perl_lib/EPrints/Plugin/Screen/EPrint/UploadMethod

compared to the github for EPrints 3.4.4:


We have File.pm, URL.pm and Staging.pm. Some changes have been made to these files to enable the staging area. I've no idea how customised this is compared to other repositories. Other values appear to be getting set and the "filename" is being set in the Files table.

Before I go through a semi-destructive process of trying to set this value, is there something very obvious that I'm missing?

Thanks,
James

*** Options: http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
*** Archive: http://www.eprints.org/tech.php/
*** EPrints community wiki: http://wiki.eprints.org/