Hyrax: Change max limit per file upload

352 views
Skip to first unread message

Bhavana

unread,
Sep 18, 2017, 11:02:16 AM9/18/17
to samvera-tech
Hi,
I have changed the
 maxFileSize: 5368709120,//5368709120 bytes,  
//instead pf the default max 500mb the hyrax, came with

app/assets/javascripts/hyrax/uploader.js


The file upload seems to take a  699.40 file.
Even the progress bar shows green with completion, but does not disappear to show the file uploaded status in the list of file above!

The uploaders seems to have struck at:
139.90 kbit/s | 00:00:00 | 100.00 % | 699.40 MB / 699.40 MB

Am I missing any other configuration?

Thanks,
Bhavana

Mike Giarlo

unread,
Sep 19, 2017, 11:28:52 AM9/19/17
to samvera-tech
I'm not aware of any other configuration. If you watch the Rails server while the upload is happening, are there any hints in the output (or in the logs)? Also, are there any errors or warnings in the JavaScript console in your browser? Those are the two places I'd look for hints, if you haven't already. Here is the uploader we use in Hyrax, in case the issue is upstream of Hyrax: https://blueimp.github.io/jQuery-File-Upload/

By the way, if your app uses Hyrax >= 2.0.0.alpha, you should be able to tweak this via the Hyrax initializer rather than directly editing JavaScript. Do a search on 'maxFileSize' within config/initializers/hyrax.rb to find the configuration.

--
Michael J. Giarlo
Technical Manager, Hydra-in-a-Box project
Software Architect, Digital Library Systems & Services
Stanford University Libraries

________________________________________
From: samver...@googlegroups.com <samver...@googlegroups.com> on behalf of Bhavana <bhavana...@gmail.com>
Sent: Monday, September 18, 2017 08:02
To: samvera-tech
Subject: [samvera-tech] Hyrax: Change max limit per file upload
--
You received this message because you are subscribed to the Google Groups "samvera-tech" group.
To unsubscribe from this group and stop receiving emails from it, send an email to samvera-tech...@googlegroups.com<mailto:samvera-tech...@googlegroups.com>.
To post to this group, send email to samver...@googlegroups.com<mailto:samver...@googlegroups.com>.
Visit this group at https://groups.google.com/group/samvera-tech.
To view this discussion on the web visit https://groups.google.com/d/msgid/samvera-tech/29191c15-40ac-4dd5-bb88-715022002f1e%40googlegroups.com<https://groups.google.com/d/msgid/samvera-tech/29191c15-40ac-4dd5-bb88-715022002f1e%40googlegroups.com?utm_medium=email&utm_source=footer>.
For more options, visit https://groups.google.com/d/optout.

Bhavana

unread,
Sep 20, 2017, 10:26:33 AM9/20/17
to samvera-tech
Many thanks Mike,
I am running hyrax 1.0.3.
There are no javac script errors while the upload is in progress.
The logs isn't displaying anything regarding the upload.

Thanks for pointing me to  https://blueimp.github.io/jQuery-File-Upload/

I will upgrade my application to use Hyrax 2.0.0 and have a tweak as you suggested.

Thanks,
Bhavana
To unsubscribe from this group and stop receiving emails from it, send an email to samvera-tech...@googlegroups.com<mailto:samvera-tech+unsubscribe@googlegroups.com>.

Jayanth D

unread,
Sep 20, 2017, 5:55:41 PM9/20/17
to bhavana...@gmail.com, samver...@googlegroups.com
Bhavana,

Checkout https://github.com/rack/rack/pull/1192. We had the same issue and increasing the buffer size in rack gem did resolve the issue for us.

Thanks,
Jay
To unsubscribe from this group and stop receiving emails from it, send an email to samvera-tech...@googlegroups.com.
To post to this group, send email to samver...@googlegroups.com.

ashik...@ubiquitypress.com

unread,
Apr 15, 2019, 1:21:51 PM4/15/19
to samvera-tech
Hi,

I'm experiencing the same issue in Hyrax. When I upload large files greater than 700mb (858 mb in my case) the progress bar shows completed but it is still under processing and I can see the xhr request status is still on pending.

In my application Hyrax app is included as a gem. I tried increasing the buffer size of the rack but that's making my system and application too slow and hangs after a while. Please let me know if there is any thing missed from my end.

Jane Sandberg

unread,
Apr 15, 2019, 1:27:53 PM4/15/19
to samver...@googlegroups.com
Hi Ashik,

We experienced this problem as well. You should also check the
config/initializers/hyrax.rb file:
https://github.com/lbcclib/community_archive/commit/e9826977843b784e1daf23e7353791d3da372d46

Also, even with updating the hyrax initializer, the uploader.js, and
the rack multipart buffer size, we still experienced this issue. I
then added a lot of disk space to the VM that houses our hyrax app,
and the problem suddenly went away.

-Jane
> --
> You received this message because you are subscribed to the Google Groups "samvera-tech" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to samvera-tech...@googlegroups.com.
> To post to this group, send email to samver...@googlegroups.com.
> Visit this group at https://groups.google.com/group/samvera-tech.
> To view this discussion on the web visit https://groups.google.com/d/msgid/samvera-tech/605ebf92-4a24-4da4-b0e9-a7c8be256f99%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



--
Jane Sandberg
Electronic Resources Librarian
Linn-Benton Community College
san...@linnbenton.edu / 541-917-4655
Pronouns: she/her/hers

ashik...@ubiquitypress.com

unread,
Apr 16, 2019, 11:01:23 AM4/16/19
to samvera-tech
Thanks Jane for the commit link, because of the hanging I have enabled the maxChunkSize option in the file uploader and now the upload progress is loading the file without any issue.

Do we have to make changes in the server side as well to support chunk size upload ? I can see the file is loaded in chunks but creating multiple records instead of appending the file chunks in Hyrax. Is there any thing needs to be done in Hyrax server code as well ? please let me know.

Thanks in Advance

son...@gmail.com

unread,
Mar 11, 2021, 4:06:56 PM3/11/21
to samvera-tech
Hi, I'm wondering if there are any further update on this.  I have the same issue when enabling maxChunkSize, files are uploaded in chunks but in separated directories.  Any settings that can support uploading in chunks?  thanks. 
-Simon

Reply all
Reply to author
Forward
0 new messages