Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Limit file upload and download sizes #1249

Merged
merged 1 commit into from Apr 12, 2017

Conversation

hortongn
Copy link
Member

@hortongn hortongn commented Apr 2, 2017

  1. Limits uploads to 3 GB per file
  2. Limits downloads to file < 3 GB. Larger files will instead show a request link that composes a contact form message.
  3. Adjusts the description for cloud provider uploads so users better understand it.
  4. Video and audio files did not previously have a download button. This adds it.

To test the upload limit locally, you can lower the maxFileSize variable in app/assets/javascripts/sufia/uploader.js to something much lower than 3 GB.

To test the download limit locally, you can lower the max_file_file variable at the bottom of app/helpers/file_set_helper.rb to something much lower than 3 GB.

@hortongn hortongn force-pushed the feature/#1055-limit-upload-download branch from e2e69b4 to 8fc0bb1 Compare April 3, 2017 16:16
@hortongn hortongn force-pushed the feature/#1055-limit-upload-download branch 2 times, most recently from 4e8d030 to c199fa3 Compare April 10, 2017 02:32
@hortongn hortongn closed this Apr 10, 2017
@hortongn hortongn reopened this Apr 10, 2017
@hortongn hortongn force-pushed the feature/#1055-limit-upload-download branch from c199fa3 to 8d3110f Compare April 10, 2017 13:00
@coveralls
Copy link

Coverage Status

Coverage increased (+0.02%) to 98.382% when pulling 8d3110f on feature/#1055-limit-upload-download into e52398b on develop.

@hortongn hortongn changed the title [WIP] Limit upload and download sizes Limit file upload and download sizes Apr 10, 2017
@scherztc scherztc self-assigned this Apr 11, 2017
@scherztc
Copy link
Contributor

2.1 GB file attached correctly in jquery uploader but when trying to submit the work, I got a SOLR error:

RSolr::Error::Http in CurationConcerns::VideosController#create
RSolr::Error::Http - 400 Bad Request Error: 'ERROR: [doc=7s75dc71j] Error adding field 'file_size_is'='2256609140' msg=For input string: "2256609140"','code'=>400}} URI: http://127.0.0.1:8983/solr/hydra-development/update?wt=ruby&softCommit=true Request Headers: {"Content-Type"=>"text/xml"} Request Data: "<field name="system_create_dtsi">2017-04-11T17:23:23Z<field name="system_modified_dtsi">2017-04-11T17:23:24Z<field name="has_model_ssim">FileSet<field name="id">7s75dc71j<field name="creator_tesim">admin@example.com<field name="creator_sim">admin@example.com<field name="accessControl_ssim">614bff15-90b0-4ab5-a4ed-7a8c2824179b<field name="depositor_ssim">admin@example.com<field name="depositor_tesim">admin@example.com<field name="title_tesim">woodmanc_dharmapops_2014.mov<field name="title_sim">woodmanc_dharmapops_2014.mov<field name="date_uploaded_dtsi">2017-04-11T17:23:23Z<field name="date_modified_dtsi">2017-04-11T17:23:23Z<field name="thumbnail_path_ss">/assets/default-f936e9c3ea7a38e2c2092099586a71380b11258697b37fb4df376704495a849a.png<field name="hasRelatedMediaFragment_ssim">7s75dc71j<field name="hasRelatedImage_ssim">7s75dc71j<field name="label_tesim">woodmanc_dharmapops_2014.mov<field name="label_ssi">woodmanc_dharmapops_2014.mov<field name="file_format_tesim">quicktime (Quicktime, ISO Media, Apple QuickTime movie, Apple QuickTime (.MOV/QT))<field name="file_format_sim">quicktime (Quicktime, ISO Media, Apple QuickTime movie, Apple QuickTime (.MOV/QT))<field name="file_size_is">2256609140<field

@scherztc scherztc merged commit 57179a5 into develop Apr 12, 2017
@scherztc scherztc deleted the feature/#1055-limit-upload-download branch April 12, 2017 14:58
@scherztc
Copy link
Contributor

Merging and creating separate issue for SOLR error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants