downloadFile_ValidateTypes | R Documentation |
It is a downloadFile module helper to return periscope2 defined file types list and warns user if an invalid type is included
downloadFile_ValidateTypes(types)
types |
list of types to test |
the list input given in types
downloadFileButton
downloadFile
logViewerOutput
downloadablePlot
downloadableTableUI
downloadableTable
#inside console
## Check valid types
result <- periscope2::downloadFile_AvailableTypes()
identical(result, c("csv", "xlsx", "tsv", "txt", "png", "jpeg", "tiff", "bmp"))
## check invalid type
testthat::expect_warning(downloadFile_ValidateTypes(types = "csv_invalid"),
"file download list contains an invalid type <csv_invalid>")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.