闪亮的 R inputFile 作为 FileChooser
Shiny R inputFile as FileChooser
注意:此应用程序并不意味着要部署在远程服务器中,而只能部署在本地计算机中。我使用 Shiny 是因为它很容易创建友好的用户界面。
在我的应用程序中,我需要 select 来自本地计算机的文件。我为此找到的唯一方法是 file.choose()
和 fileInput()
。第一个选项可以工作,但它对用户不友好,因为文件选择器不会出现在浏览器顶部...甚至不会作为任务栏中的新元素出现,因此用户可能会感到困惑。
1) 还有其他方法吗? (不使用 fileInput 作为 fileChooser)
2) 如果没有,有没有办法隐藏上传栏?对于 fileChooser 没有任何意义。
这里不知道要修改什么才能隐藏上传栏
编辑:我还在我的应用程序中使用了其他进度条,所以我不确定隐藏进度条 class 是否会隐藏我所有的 progress <- shiny::Progress$new()
正如 warmoverflow 在评论中所说,这就是所需要的。
tags$style(type="text/css", ".shiny-file-input-progress { display: none }")
有一个 R 包 shinyFiles。它的描述:
Provides functionality for client-side navigation of the server side
file system in shiny apps. In case the app is running locally this
gives the user direct access to the file system without the need to
"download" files to a temporary location. Both file and folder
selection as well as file saving is available.
注意:此应用程序并不意味着要部署在远程服务器中,而只能部署在本地计算机中。我使用 Shiny 是因为它很容易创建友好的用户界面。
在我的应用程序中,我需要 select 来自本地计算机的文件。我为此找到的唯一方法是 file.choose()
和 fileInput()
。第一个选项可以工作,但它对用户不友好,因为文件选择器不会出现在浏览器顶部...甚至不会作为任务栏中的新元素出现,因此用户可能会感到困惑。
1) 还有其他方法吗? (不使用 fileInput 作为 fileChooser)
2) 如果没有,有没有办法隐藏上传栏?对于 fileChooser 没有任何意义。
这里不知道要修改什么才能隐藏上传栏
编辑:我还在我的应用程序中使用了其他进度条,所以我不确定隐藏进度条 class 是否会隐藏我所有的 progress <- shiny::Progress$new()
正如 warmoverflow 在评论中所说,这就是所需要的。
tags$style(type="text/css", ".shiny-file-input-progress { display: none }")
有一个 R 包 shinyFiles。它的描述:
Provides functionality for client-side navigation of the server side file system in shiny apps. In case the app is running locally this gives the user direct access to the file system without the need to "download" files to a temporary location. Both file and folder selection as well as file saving is available.