Commit 3e16c91b authored by mmassaviol's avatar mmassaviol
Browse files

Update volumes management for shinyfiles

parent 408cdcb2
......@@ -663,7 +663,18 @@ generate_pages_server <- function() {
for(page in APP$pages){
for(box in page$boxes){
for(cnt in box$content){
volumes = 'c(data="/samples",results="/results")'
if ("volumes" %in% names(cnt)){
volumes = 'c('
for (key in names(cnt$volumes[[1]]))
volumes = paste0(volumes,key,'="',cnt$volumes[[1]][key],'",')
volumes = substr(volumes, 1, nchar(volumes)-1)
volumes = paste0(volumes,')')
print(volumes)
}
else{
volumes = 'c(Data="/Data",Results="/Results")'
}
if (cnt$type == "input_file"){
res <- res + '\t\tshinyFileChoose(input, "shinyfiles_' + cnt$name + '", root=' + volumes + ',session = session)\n'
res <- res + '\t\tobserveEvent({parseFilePaths(' + volumes + ',input$shinyfiles_' + cnt$name + ')$datapath[1]},{\n'
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment