Uploading multiple files yields identical datapaths

133 views
Skip to first unread message

kristoff...@gmail.com

unread,
Apr 6, 2013, 8:59:01 PM4/6/13
to shiny-...@googlegroups.com
Hi

When trying to upload multiple files via fileInput("files", ..., multiple = TRUE) the input$files data frame contains identical entries in datapath for different input files, e.g:

                                          name                                   datapath
1 2012-02-06_kfsq120201_teg_rp0319_runid-1.rds /tmp/RtmpBNyxXI/a759a583afcd07c7dea87b0a/0
2 2012-02-14_kfsq120201_teg_rp0319_runid-1.rds /tmp/RtmpBNyxXI/a759a583afcd07c7dea87b0a/4
3 2012-03-06_kfsq120201_teg_rp0319_runid-1.rds /tmp/RtmpBNyxXI/a759a583afcd07c7dea87b0a/4
4 2012-03-07_kfsq120201_teg_rp0319_runid-1.rds /tmp/RtmpBNyxXI/a759a583afcd07c7dea87b0a/4
5 2012-03-16_kfsq120201_teg_rp0319_runid-1.rds /tmp/RtmpBNyxXI/a759a583afcd07c7dea87b0a/4

Looking the fileupload.R source it appears that the datapath filename is the length of (.files):

filename <- file.path(.dir, as.character(length(.files)))

Are some files uploaded simultaneously, so that the first (0) gets its own datapath, but the remaining four gets the same (4)?

Running shiny 0.5.0, and this is reproducible with different filetypes. Any ideas?

Best Regards

./ Kristoffer

Joe Cheng

unread,
Apr 6, 2013, 9:11:06 PM4/6/13
to shiny-...@googlegroups.com
Bug confirmed. I'll check a fix in shortly. Thanks!



--
You received this message because you are subscribed to the Google Groups "Shiny - Web Framework for R" group.
To unsubscribe from this group and stop receiving emails from it, send an email to shiny-discus...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Joe Cheng

unread,
Apr 6, 2013, 10:02:02 PM4/6/13
to shiny-...@googlegroups.com
I checked in a fix, you can install it as usual with:

install.packages("devtools")  # unless you have it already
devtools::install_github("shiny", "rstudio")

Thanks for the report!

Kristoffer Winther Balling

unread,
Apr 7, 2013, 3:32:12 AM4/7/13
to shiny-...@googlegroups.com
Thanks! Works for me as well now.

And thanks for shiny - it is a really nice and useful package!

Best Regards

Kristoffer 

John Luis

unread,
Jun 5, 2013, 11:21:41 AM6/5/13
to shiny-...@googlegroups.com
Guys, any idea when this update will be pushed to cran?  Due to funky company rules, going through devtools is a bit of a pain.

Thanks as always.  I love shiny!

Joe Cheng

unread,
Jun 5, 2013, 1:12:44 PM6/5/13
to shiny-...@googlegroups.com
Very soon, thanks for your patience. We've been held up waiting on httpuv 1.0.6.3 to be allowed into CRAN but that was approved on Monday so we'll be pushing shiny ASAP.
Reply all
Reply to author
Forward
0 new messages