Uploading Collection logo fails

282 views
Skip to first unread message

Steve Michaels

unread,
Jan 23, 2024, 2:04:11 PM1/23/24
to DSpace Technical Support
I'm trying to update a collection logo in 7.6.

When I add the file to the uploader, nothing happens and I get a Uploading Collection failed error.

The console also shows a 400 error on the upload and also shows a Syntax Error - Not valid JSON

Technologiczny Informator

unread,
Jan 24, 2024, 3:02:03 AM1/24/24
to DSpace Technical Support
I wonder if this has anything to do with the error I reported in May 2023, and still, no one has fixed it.


Are you inserting the logo as an administrator or another user?

Regards
Mariusz

Steve Michaels

unread,
Jan 24, 2024, 11:32:31 AM1/24/24
to DSpace Technical Support
I'm logged in as the site administrator.

DSpace Technical Support

unread,
Jan 24, 2024, 3:00:20 PM1/24/24
to DSpace Technical Support
Hi all,

I can verify that Collection logo uploads work on our demo site (https://demo.dspace.org) running 7.6.1 *provided that you are a site administrator*.   However, we still do have an open bug to get this logo upload working for Community/Collection admins (the ticket is waiting on a volunteer to claim it -- if anyone is interested, I'd love to see this fixed!).  https://github.com/DSpace/dspace-angular/issues/2240

If you didn't have proper permissions, then I'd expect you'd see a 403 error.  A 400 error is strange in this situation as that'd almost imply the user interface is sending the wrong command to the REST API, or somehow the command is being garbled or lost.  I'd recommend using our troubleshooting guide to see if you can find additional details about the 400 error either from your browser's DevTools, or from the backend logs. Finding those additional details may be necessary to understand what is going on. https://wiki.lyrasis.org/display/DSPACE/Troubleshoot+an+error#Troubleshootanerror-DSpace7.x(orabove)

Tim

Steve Michaels

unread,
Jan 25, 2024, 12:20:31 PM1/25/24
to DSpace Technical Support
The problem seems to be an issue with the uploaded logo file size.

Is there an inherent limit on the size of a logo file?

DSpace Technical Support

unread,
Jan 26, 2024, 11:15:38 AM1/26/24
to DSpace Technical Support
Steve,

As far as I'm aware, the only limit is in the **maximum upload size** (for the application overall).   This is documented in our Submission docs here: https://wiki.lyrasis.org/display/DSDOC7x/Submission+User+Interface#SubmissionUserInterface-BasicSettings   However, these max file size settings would also apply to any other upload interface, including the logo upload form, as they are configuration for the entire Spring Boot framework (which DSpace uses to run its backend)

Tim

tant...@umn.edu

unread,
Jan 30, 2024, 4:57:51 PM1/30/24
to DSpace Technical Support
I can confirm the same problem.

The dspace logs offer no clue -- everything looks normal there.

In the javascript console (and in the apache logs) the failing request is the same:

This is the correct REST call, and I'm able to substitute other bitstream uuids and retrieve content successfully, but for some reason the call fails for community/collection logos.  Oddly, it fails with 400 even though the request is correct so far as I can tell.

Other stuff I checked:
I am logged in as a site admin.

The logo_bitstream_id field in the community/collection is properly linked to a bitstream uuid.  

The internal_id of the bitstream is correct, the file exists and the 'file' command reports the correct file, so the disk file itself is not corrupt.

Any ideas on what else to check?
Regards,
~~Bill

Steve Michaels

unread,
Jan 31, 2024, 2:36:19 PM1/31/24
to DSpace Technical Support
It appears that I'm having the same issue with regular item uploads; I'm trying to create a new item with a 609KB main file, which I can't upload.

I've checked the spring.servlet.multipart.max-file-size and spring.servlet.multipart.max-request-size settings; they're both at 512MB.

tant...@umn.edu

unread,
Jan 31, 2024, 2:54:59 PM1/31/24
to DSpace Technical Support
Are we talking about 2 different issues here?  In my case, I can upload the thumbnail, but I cannot display it.  I have confirmed that the image is there on disk, and it is present in the database.  However, the actual display of the image fails with a 400 - Bad Request error.

Steve Michaels

unread,
Jan 31, 2024, 3:48:31 PM1/31/24
to DSpace Technical Support
We might be.  Currently, I can't seem to upload anything bigger than about 150KB.  This issue seems to have started in the past 2 weeks.

It sounds like you're having an issue with displaying the logo once it's on the server.

Steve Michaels

unread,
Feb 1, 2024, 7:58:01 AM2/1/24
to DSpace Technical Support
I've traced my issue to modsecurity.  Once I disabled modsecurity, the issue seems to be resolved.

tant...@umn.edu

unread,
Feb 1, 2024, 11:16:39 AM2/1/24
to DSpace Technical Support
I have traced my problem to the fact that all community/collection logos have a bitstream format of Unknown, (and there is no metadata for the bitstream, although this has no effect on the error).  If I update the bitstream_format_id to it's correct value, the logo displays.

I am on version 7.6.1.  This functionality works on the demo site, although the version there is 7.6.2-SNAPSHOT. Is anybody aware of any work done here in the area of collection/community logos?
Reply all
Reply to author
Forward
0 new messages