EPrints Technical Mailing List Archive
See the EPrints wiki for instructions on how to join this mailing list and related information.
Message: #09656
< Previous (by date) | Next (by date) > | < Previous (in thread) | Next (in thread) > | Messages - Most Recent First | Threads - Most Recent First
RE: [EP-tech] 0 byte file uploads
- To: "eprints-tech@ecs.soton.ac.uk" <eprints-tech@ecs.soton.ac.uk>
- Subject: RE: [EP-tech] 0 byte file uploads
- From: Don Cruickshank <dgc@ecs.soton.ac.uk>
- Date: Fri, 1 Mar 2024 16:16:14 +0000
Hi all, I’ve been tracking this issue for some time and I came to the conclusion that the drag and drop support was the cause of the zero-byte uploads as I checked all of the reported instances on a number
of services and verified that drag and drop was used in all cases. The current drag and drop code uses multiple stages to the EPrints REST API:
I reproduced the zero-byte file issue by stopping the process after step 1. The time that I managed to reproduce this myself on Google Chrome, I saw a console message reporting that the form submission
had been cancelled because it had been removed from the DOM. Since the above steps are done with recursion on the success of previous steps, this seems to me to be a possible root cause. I fixed the issue by rewriting the drag and drop code entirely to use XMLHttpRequest instead which uses the same method as the regular workflow update. This is tracked in
https://github.com/eprints/eprints3.5/issues/43 which involves replacing one file with the following: This change has the added benefit that it removes the ‘fakepath’ label that gets shown and it also uses the modern XMLHttpRequest feature to track upload progress client-side and so it doesn’t keep
requesting upload progress from the EPrints server. Regards, Don. From: eprints-tech-request@ecs.soton.ac.uk <eprints-tech-request@ecs.soton.ac.uk>
On Behalf Of Will Fyson CAUTION: This e-mail originated outside the
University of Southampton. CAUTION: This e-mail originated outside the
University of Southampton. Hi all, Just to confirm what David said in an earlier email, I think this can occur when depositors use the drag and drop interface, specifically where the upload process
gets a bit out of sync with the document record creation process when uploading multiple files, and as a result some files drift apart from their respective document record and fail to upload correctly. As such I applied a fix in the eprintsug core at
https://github.com/eprintsug/ulcc-core/commit/c28c11ad3e5ffac72fe7b4f9d0874b3e93627770 which makes the drag and drop process recursive, ensuring we don't try and upload the next file until we've definitely finished creating the previous document. This was a fix to the _javascript_ drag and drop uploader and it sounds like a new more up to date approach is imminent in the next release, but I just thought I'd
bring it to people's attention in case it's useful! Many thanks, Will Will Fyson Development & Support Analyst,
Research Technologies CoSector, University of London Senate House Malet Street London WC1E 7HU t: +44 (0)20 7863 1341 w:
https://cosector.com/digital-research/ The University of London is an exempt charity in England and Wales. From:
eprints-tech-request@ecs.soton.ac.uk <eprints-tech-request@ecs.soton.ac.uk> on behalf of Martin Brändle <martin.braendle@uzh.ch> CAUTION: This e-mail originated outside the
University of Southampton. CAUTION: This e-mail originated outside the
University of Southampton. Dear all, thank you. I backported David’s
https://github.com/eprints/eprints3.4/commit/f03b80da02b319d59705144ecccdc933b91c99e5 fix to our EPrints version, it works like a charm. Kind regards, Martin |
- References:
- [EP-tech] 0 byte file uploads
- From: Martin Brändle <martin.braendle@uzh.ch>
- Re: [EP-tech] 0 byte file uploads
- From: David R Newman <drn@ecs.soton.ac.uk>
- RE: [EP-tech] 0 byte file uploads
- From: John Salter <J.Salter@leeds.ac.uk>
- Re: [EP-tech] 0 byte file uploads
- From: Liam Green-Hughes <L.E.Green-Hughes@kent.ac.uk>
- Re: [EP-tech] 0 byte file uploads
- From: Martin Brändle <martin.braendle@uzh.ch>
- Re: [EP-tech] 0 byte file uploads
- From: Tomasz Neugebauer <Tomasz.Neugebauer@concordia.ca>
- Re: [EP-tech] 0 byte file uploads
- From: Liam Green-Hughes <L.E.Green-Hughes@kent.ac.uk>
- RE: [EP-tech] 0 byte file uploads
- From: John Salter <J.Salter@leeds.ac.uk>
- Re: [EP-tech] 0 byte file uploads
- From: Martin Brändle <martin.braendle@uzh.ch>
- Re: [EP-tech] 0 byte file uploads
- From: Will Fyson <will.fyson@cosector.com>
- [EP-tech] 0 byte file uploads
- Prev by Date: [EP-tech] Sword 2.0 API upload times
- Next by Date: Re: [EP-tech] Sword 2.0 API upload times
- Previous by thread: Re: [EP-tech] 0 byte file uploads
- Next by thread: [EP-tech] Sword 2.0 API upload times
- Index(es):