-
Notifications
You must be signed in to change notification settings - Fork 35
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
Set list of files format allowed #51
Comments
Thanks for the suggestion. Victor |
Hello Just a feedback, Thanks again See: library(shiny)
library(datamods)
ui <- fluidPage(
# Try with different Bootstrap version
# theme = bslib::bs_theme(version = 4),
fluidRow(
column(
width = 4,
checkboxGroupInput(
inputId = "from",
label = "From",
choices = c("env", "file", "copypaste", "googlesheets", "url"),
selected = c("file", "copypaste")
),
actionButton("launch_modal", "Launch modal window")
),
column(
width = 8,
tags$b("Imported data:"),
verbatimTextOutput(outputId = "name"),
verbatimTextOutput(outputId = "data")
)
)
)
server <- function(input, output, session) {
observeEvent(input$launch_modal, {
req(input$from)
import_modal(
id = "myid",
from = input$from,
file_extensions = c(".tsv", ".rdata", ".xls"),
title = "Import data to be used in application"
)
})
imported <- import_server("myid", return_class = "tbl_df")
output$name <- renderPrint({
req(imported$name())
imported$name()
})
output$data <- renderPrint({
req(imported$data())
imported$data()
})
}
if (interactive())
shinyApp(ui, server)
|
Thanks that's fixed. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi
Is it possible to have an argument
file_extensions
in theimport_modal()
function to control list of possible file formats allowed?Thanks!
Etienne
The text was updated successfully, but these errors were encountered: