curationexperts / epigaea

A MIRA replacement running on Hyrax 2.0
Other
1 stars 2 forks source link

Large batches of small items #900

Closed mark-dce closed 6 years ago

mark-dce commented 6 years ago

Set Hyrax config upload file limit to 500

mpeachy commented 6 years ago

@mark-dce I was still only able to upload 100 files at a time. I can go back and add the files left off of the batch to complete it, but would rather be able to upload all batch files at once.

Alexandermay commented 6 years ago

Screen Shot 2018-03-06 at 10.48.29 AM.png

Alexandermay commented 6 years ago

I'm getting the following error message for a batch of 123 using Chrome and Mac/OS. When I attempt to add the files that didn't get the error message to the batch, I get: Screen Shot 2018-03-06 at 10.58.41 AM.png

When I goto batch status, I get status "new" instead of complete, or incomplete Screen Shot 2018-03-06 at 11.04.32 AM.png

and when I select that batch, nothing is attached:

Screen Shot 2018-03-06 at 11.07.07 AM.png

mark-dce commented 6 years ago

Diagnostic details on the first issue - "maximum number of files exceeded"

The file upload limits are passed to the uploader by hyrax/app/assets/javascripts/hyrax/config.js.erb

Hyrax.config = {
  uploader: <%= Hyrax.config.uploader.to_json %>
}

In my local config./initializers/hyrax.rb I have

  # Options to control the file uploader
  config.uploader = {
    limitConcurrentUploads: 6,
    maxNumberOfFiles: 15,
    maxFileSize: 24 #6.gigabytes
  }

When I look at assets/javascripts/hyrax/config-self######.js in the Chrome debugger, it shows

Hyrax.config = {
  uploader: {"limitConcurrentUploads":6,"maxNumberOfFiles":100,"maxFileSize":6442450944}
}

Which are the defaults set in hyrax/lib/hyrax/configuration.rb:430-437, not the settings from my initializer.

BUT

When I insert a byebug line in config.js.erb like this

Hyrax.config = {
<% byebug %>
  uploader: <%= Hyrax.config.uploader.to_json %>
}

And then refresh the application, after I continue from the breakpoint, the Chrome web inspector then shows assets/javascripts/hyrax/config-self######.jsas

Hyrax.config = {
  uploader: {"limitConcurrentUploads":6,"maxNumberOfFiles":15,"maxFileSize":24}
}

If I remove the breakpoint and refresh the page, I go back to the gem defaults instead of the settings from my initializer. I don't understand why this is happening.