Inclusion of file remove and spinner on download
This commit is contained in:
14
app.R
14
app.R
@@ -643,7 +643,10 @@ server <- function(input, output, session) {
|
||||
zipFile <- zipr(paste0("tmp/MESO-", format(Sys.time(), "%m%d_%H%M"), ".zip"), c("tmp/layer1.png", "tmp/layer2.png", "tmp/layer3.png", "tmp/dataset.xlsx"))
|
||||
|
||||
print(paste("zip file complete", zipFile))
|
||||
|
||||
file.remove("tmp/layer1.png")
|
||||
file.remove("tmp/layer2.png")
|
||||
file.remove("tmp/layer3.png")
|
||||
file.remove("tmp/dataset.xlsx")
|
||||
return(zipFile)
|
||||
}
|
||||
|
||||
@@ -659,8 +662,17 @@ server <- function(input, output, session) {
|
||||
output$download <- downloadHandler(
|
||||
filename = paste0("MESO-", format(Sys.time(), "%m%d_%H%M"), ".zip"),
|
||||
content = function(file) {
|
||||
showModal(
|
||||
modalDialog(
|
||||
fluidRow(
|
||||
column(width = 12) %>% withSpinner(type = 5, proxy.height = "200px")
|
||||
),
|
||||
footer=div()
|
||||
)
|
||||
)
|
||||
fName <- export(modelList[[.selections$model]])
|
||||
file.copy(fName, file)
|
||||
removeModal()
|
||||
},
|
||||
contentType = "application/zip"
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user