file.info does not work in r shiny?

Hi,

I want to capture the creation date of file I am uploading in r shiny.
It works on local machine but when I deploy on r shiny it does not work. It gives NA for all file.info details.
file.info works only for local machine ? is there any way I can capture the creation date?
following is the log of r shiny

2019-04-20T11:48:25.353489+00:00 shinyapps[841678]: size isdir mode mtime ctime atime uid gid uname grname
2019-04-20T11:48:25.353545+00:00 shinyapps[841678]: IMG-20190306-WA0042.jpg NA NA NA NA
2019-04-20T11:48:25.354488+00:00 shinyapps[841678]: [1] "2019-04-20"
2019-04-20T11:48:25.355589+00:00 shinyapps[841678]: Warning: Error in if: missing value where TRUE/FALSE needed
2019-04-20T11:48:25.360865+00:00 shinyapps[841678]: 84: observeEventHandler [/srv/connect/apps/EMPORIOS/app.R#1015]

How are you uploading the file ?
It is possible that it is not name as you expect... :thinking:

Yes I am uploading file to shiny and also changing the name of jpg file, I want to display the jpg file for each outlet so I am hard coding it
inFile <- input$myFile
if (is.null(inFile))
return()
inFile$name <- paste(input$time,input$attoutlet,Sys.Date(), ".jpg", sep="")
print(inFile$name)
file.copy(inFile$datapath, file.path(".", inFile$name), recursive = TRUE )

This is how I am using new file name for rendering
output$HubtowSolaris1 <- renderImage({
filename <- "Star Bazaar Hubtown Solaris.jpg"
list(src = filename,
width = 300,
height = 200,
alt = paste("Image number", input$n))
}, deleteFile = FALSE)

If I may, it is really difficult to help you without any reproducible example.

Can you try to build something up ?

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.