[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[EP-tech] cannot upload file above 1GB



CAUTION: This e-mail originated outside the University of Southampton.


Il 23/01/23 10:49, David R Newman via Eprints-tech ha scritto:
Hi Yuri,

Sorry, looks like a copy and paste failure that only copied part of the line.  I have now fixed this.  Before the weekend I also noted another bit of additional JavaScript that was missing.  Did you follow the guide as it now is with 4 points of modifications needed to the currently released javascript/auto/88_uploadmethod_file.js?


I've copied it again. Now I've found that in

if (json.size > max_size)
{
    UploadMethod_cancel(uuid);
     eprints.currentRepository().phrase( {'Plugin/Screen/EPrint/UploadMethod/File:filesize_too_big':{} },function(phrase){ alert (file.name+": \n"+ phrase["Plugin/Screen/EPrint/UploadMethod/File:filesize_too_big"]);  } ) ;
}

you reference "file" while in UploadMethod_update_progress_bar(uuid, container, pe) there's no file variable. The alert popup prints "ReferenceError: file is not defined". I think that in this function there's no info about the file.


Note: this is eprints 3.3.15

Regards

David Newman

On 23/01/2023 9:13 am, Yuri wrote:
CAUTION: This e-mail originated outside the University of Southampton.

Hi David!

 I think this part is missing some closings:

if (json.size > max_size)
{
    UploadMethod_cancel(uuid);
    eprints.currentRepository().phrase( {'Plugin/Screen/EPrint/UploadMethod/File:filesize_too_big':{} },function(phrase){ alert (phrase["Plugin/Screen/EPrint/UploadMethod/File
}

I manage to make it work adding the closings (the upload is cancelled if the limit is exceeded) but the aler popup "undefined" instead of the phrase above. Here the code:

                         if (json.size > max_size)
                        {
                            UploadMethod_cancel(uuid);
                            eprints.currentRepository().phrase( {'Plugin/Screen/EPrint/UploadMethod/File:filesize_too_big':{} },function(phrase){ alert (phrase["Plugin/Screen/EPrint/UploadMethod/File"])})
                        }




Il 20/01/23 17:39, David R Newman ha scritto:

Ah, I forgot that HTML/XML markup needs to be encoded, (i.e. with < and >).  Now fixed.

On 20/01/2023 12:36, Yuri via Eprints-tech wrote:
CAUTION: This e-mail originated outside the University of Southampton.

3. After the line add the following if block:

^^^

here it is missing the line number or code.

Il 20/01/23 10:35, David R Newman via Eprints-tech ha scritto:
Hi Yuri,

I was going to suggest modifying the value for max_size in your javascript/auto/88_uploadmethod_file.js but then realised that the concept of max_size is only in a local modification I made.  So I have written some instructions for how to modify your own 88_uploadmethod_file.js:

https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwiki.eprints.org%2Fw%2FLimiting_Upload_File_Size&data=05%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7Cd3e66423548943f2250908dafd29c95f%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C638100653158651640%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=hy%2BsahAR6k31xgyh9ouDksQSrPq%2F%2BmDS%2BxtSM7G3c%2FE%3D&reserved=0<https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwiki.eprints.org%2Fw%2FLimiting_Upload_File_Size&data=05%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7Cd3e66423548943f2250908dafd29c95f%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C638100653158651640%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=hy%2BsahAR6k31xgyh9ouDksQSrPq%2F%2BmDS%2BxtSM7G3c%2FE%3D&reserved=0>

If you (or anyone else on the list that wants to try this) could tell me how following these instructions goes, that would be useful.  In case there are any corrections I need to make to them.

Regards

David Newman

On 20/01/2023 8:44 am, Yuri wrote:
CAUTION: This e-mail originated outside the University of Southampton.

Yes, it was it! Thanks a lot!

When you hit the limit, the javascript does not complain. Is there a way to intercept the Apache event denying the upload? Or it is better to have the javascript to check itself for the limit?

Il 19/01/23 17:58, David R Newman ha scritto:

Hi Yuri,

I suspect this may be an Apache restriction on LimitRequestBody [1].  The default value for this is 1073741824 bytes which is 1 GiB.  I think you can put this in any Apache configuration file but as you want to make sure this is maintained if you migrate your repository, I would recommend adding it to your archive's securevhost.conf, as I would assume you have HTTPS enabled and therefore file uploads would only happen over HTTPS.  A setting something like:

LimitRequestBody 2147483648

Would up the max upload limit to 2GB, once you reload your webserver.

Regards

David Newman

[1] https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fhttpd.apache.org%2Fdocs%2F2.4%2Fmod%2Fcore.html%23limitrequestbody&data=05%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7Cd3e66423548943f2250908dafd29c95f%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C638100653158651640%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=c4CLzhKzd%2FJ91KnwutWCZbx%2BE7wtddYo1%2BNLctBOtLw%3D&reserved=0<https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fhttpd.apache.org%2Fdocs%2F2.4%2Fmod%2Fcore.html%23limitrequestbody&data=05%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7Cd3e66423548943f2250908dafd29c95f%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C638100653158651640%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=c4CLzhKzd%2FJ91KnwutWCZbx%2BE7wtddYo1%2BNLctBOtLw%3D&reserved=0>

On 19/01/2023 16:33, Yuri via Eprints-tech wrote:

CAUTION: This e-mail originated outside the University of Southampton.

Hi!

  I've just discovered that I can upload until 1GB without any problem
(progress bar working correctly). If I upload above 1GB, the upload bar
stay at 0% and never move, and no upload is done. In the browser, I can
see it calls /cgi/users/ajax/upload_progress?progressid=<a string> about
every 1 or 2 seconds, and the transferred bytes are zero. Below 1GB, I
can see the number of transferred bytes progressing.

  How can I check what is the problem? It is Eprints 3.3.15


*** Options: http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
*** Archive: https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.eprints.org%2Ftech.php%2F&data=05%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7Cd3e66423548943f2250908dafd29c95f%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C638100653158651640%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=FCwf%2FboLRCQPsihEdcO04jWKGVEVyuS8CmxYuYg8U8k%3D&reserved=0<https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.eprints.org%2Ftech.php%2F&data=05%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7Cd3e66423548943f2250908dafd29c95f%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C638100653158651640%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=FCwf%2FboLRCQPsihEdcO04jWKGVEVyuS8CmxYuYg8U8k%3D&reserved=0>
*** EPrints community wiki: https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwiki.eprints.org%2F&data=05%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7Cd3e66423548943f2250908dafd29c95f%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C638100653158651640%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=NWPLOC7%2BaSSE7KmYxqGqdLXIJoh2Buc6tHwC4yUsZdA%3D&reserved=0<https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwiki.eprints.org%2F&data=05%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7Cd3e66423548943f2250908dafd29c95f%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C638100653158651640%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=NWPLOC7%2BaSSE7KmYxqGqdLXIJoh2Buc6tHwC4yUsZdA%3D&reserved=0>





*** Options: http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
*** Archive: https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.eprints.org%2Ftech.php%2F&data=05%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7Cd3e66423548943f2250908dafd29c95f%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C638100653158651640%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=FCwf%2FboLRCQPsihEdcO04jWKGVEVyuS8CmxYuYg8U8k%3D&reserved=0<https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.eprints.org%2Ftech.php%2F&data=05%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7Cd3e66423548943f2250908dafd29c95f%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C638100653158807857%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=RtBFpBGJ7Z8SpBxMW4OKALXkO05cRMeGmCb6fg5Sbmk%3D&reserved=0>
*** EPrints community wiki: https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwiki.eprints.org%2F&data=05%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7Cd3e66423548943f2250908dafd29c95f%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C638100653158807857%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=Dub5Fjj9s%2FSyxM68ZZH0f%2BugB83fcRwZXcir0NRgNIs%3D&reserved=0<https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwiki.eprints.org%2F&data=05%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7Cd3e66423548943f2250908dafd29c95f%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C638100653158807857%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=Dub5Fjj9s%2FSyxM68ZZH0f%2BugB83fcRwZXcir0NRgNIs%3D&reserved=0>



*** Options: http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
*** Archive: https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.eprints.org%2Ftech.php%2F&data=05%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7Cd3e66423548943f2250908dafd29c95f%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C638100653158807857%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=RtBFpBGJ7Z8SpBxMW4OKALXkO05cRMeGmCb6fg5Sbmk%3D&reserved=0<https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.eprints.org%2Ftech.php%2F&data=05%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7Cd3e66423548943f2250908dafd29c95f%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C638100653158807857%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=RtBFpBGJ7Z8SpBxMW4OKALXkO05cRMeGmCb6fg5Sbmk%3D&reserved=0>
*** EPrints community wiki: https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwiki.eprints.org%2F&data=05%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7Cd3e66423548943f2250908dafd29c95f%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C638100653158807857%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=Dub5Fjj9s%2FSyxM68ZZH0f%2BugB83fcRwZXcir0NRgNIs%3D&reserved=0<https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwiki.eprints.org%2F&data=05%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7Cd3e66423548943f2250908dafd29c95f%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C638100653158807857%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=Dub5Fjj9s%2FSyxM68ZZH0f%2BugB83fcRwZXcir0NRgNIs%3D&reserved=0>




*** Options: http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
*** Archive: https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.eprints.org%2Ftech.php%2F&data=05%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7Cd3e66423548943f2250908dafd29c95f%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C638100653158807857%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=RtBFpBGJ7Z8SpBxMW4OKALXkO05cRMeGmCb6fg5Sbmk%3D&reserved=0
*** EPrints community wiki: https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwiki.eprints.org%2F&data=05%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7Cd3e66423548943f2250908dafd29c95f%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C638100653158807857%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=Dub5Fjj9s%2FSyxM68ZZH0f%2BugB83fcRwZXcir0NRgNIs%3D&reserved=0

--
Yuri Carrer

 CAB - Centro di Ateneo per le Biblioteche, Universit? di Padova
 Tel: 049/827 9712 - Via Beato Pellegrino, 28 - Padova

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ecs.soton.ac.uk/pipermail/eprints-tech/attachments/20230123/76932e1b/attachment-0001.html