fixed: issue #1365 - #1410
Conversation
|
Thanks for the contribution @poonam-16! I like the idea of a single source of truth, very witty! Unfortunately, this does not seem t work on an installed package. I added some comments |
| #' } | ||
| #' @export | ||
|
|
||
| max_upload_size_mb <- 30 |
There was a problem hiding this comment.
issue: as you see this is cutting the roxygen docx (all that is before @export) which may produce a fail in geenerating the documentation. Instead, move this line right before:
options(shiny.maxRequestSize = max_upload_size_mb * 1024^2)
| p("Upload your PK dataset and Settings file (optional).", | ||
| tags$br(), | ||
| tags$small(style = "color: #6c757d; display: block; margin-top: 4px;", | ||
| sprintf("Maximum upload size: %s MB", max_upload_size_mb))), |
There was a problem hiding this comment.
Nice idea! Having a single source of truth is always good. However, for an installed pacakge the max_upload_size_mb variable won't be available in this submodule.
I would recommend that we instead search for the value in the settings getOption("shiny.maxRequestSize", but in case for any reason run_app.R and the setting was not set (i.e, someone decided to run the App manually without using our function, shiny::runApp(...)) then we tell teh code to assume we are using the default that shiny has (5 MB). In code this will translate to this:
| sprintf("Maximum upload size: %s MB", max_upload_size_mb))), | |
| sprintf("Maximum upload size: %s MB", | |
| getOption("shiny.maxRequestSize", 5 * 1024^2) / 1024^2))), |
Issue
Closes #1365
Description
Added a helper text that states the maximum upload limit
Additionally, sourced the limit from a single constant so the UI text and run_app.R stay in sync
Definition of Done
Contributor checklist
.scsschange was done, rundata-raw/compile_css.Rdata-raw/test_suggests_hidden.R