简体   繁体   English

访问客户端本地网络上的文件,但不能从 Web 服务器访问本地计算机

[英]Access files on clients local network but not local machine from web server

I have a server that I am uploading files to every 30 minutes.我有一个服务器,我每 30 分钟上传一次文件。 That server is running a shiny server which displays that data.该服务器正在运行显示该数据的闪亮服务器。

The server is here服务器在这里

http://45.55.208.171:3838/austin/ http://45.55.208.171:3838/austin/

Those files are uploaded from machines on the local network to the remote server that is running the shiny app.这些文件从本地网络上的机器上传到运行闪亮应用程序的远程服务器。 Is there anyway to allow the remote server to have access to those files on the users local network so it could be real time instead of 30 minute batches?无论如何,是否允许远程服务器访问用户本地网络上的这些文件,以便它可以是实时的而不是 30 分钟的批处理? The users are using chrome and are behind a fire wall and proxy server.用户正在使用 chrome 并且在防火墙和代理服务器后面。

There is a shiny control ( fileInput ) that will allow a user to select multiple files, and then send them to the server where they will be stored in a temp location that can then be read by the server.有一个闪亮的控件 ( fileInput ),它允许用户选择多个文件,然后将它们发送到服务器,在那里它们将存储在服务器可以读取的临时位置。

Here is an example program that uses it:这是一个使用它的示例程序:

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)

It looks like this after selecting three example csv files:选择三个示例 csv 文件后,它看起来像这样:

在此处输入图片说明

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM