[英]Access files on clients local network but not local machine from web server
我有一個服務器,我每 30 分鍾上傳一次文件。 該服務器正在運行顯示該數據的閃亮服務器。
服務器在這里
http://45.55.208.171:3838/austin/
這些文件從本地網絡上的機器上傳到運行閃亮應用程序的遠程服務器。 無論如何,是否允許遠程服務器訪問用戶本地網絡上的這些文件,以便它可以是實時的而不是 30 分鍾的批處理? 用戶正在使用 chrome 並且在防火牆和代理服務器后面。
有一個閃亮的控件 ( fileInput
),它允許用戶選擇多個文件,然后將它們發送到服務器,在那里它們將存儲在服務器可以讀取的臨時位置。
這是一個使用它的示例程序:
library(shiny)
s <- shinyServer(function(input,output) {
output$filetable <- renderTable({
if (is.null(input$files)) {
# User has not uploaded a file yet
return(NULL)
}
input$files
})
})
u <- shinyUI(pageWithSidebar(
headerPanel("File input test"),
sidebarPanel(
fileInput("files","File data",multiple = TRUE)
),
mainPanel(
tableOutput("filetable")
)
))
shinyApp(ui=u,server=s)
選擇三個示例 csv 文件后,它看起來像這樣:
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.