Announcing shinyFiles package

577 views
Skip to first unread message

Thomas Lin Pedersen

unread,
May 23, 2014, 7:37:17 AM5/23/14
to shiny-...@googlegroups.com
Hi All

I'm happy to announce the availability of my new shiny extension package 'shinyFiles'.

The purpose of the package is to make a server side file navigator available to shiny app developers, comparable to the given with the fileInput() function. The use cases are mostly the following:
  • When an app is intended to run locally, the use of fileInput gives an unnecessary overhead by requiring selected files to be copied to a temporary location before being made available to the server script. This is of little concern with small files, but as the file sizes approach the Gb range it gets unacceptable. shinyFiles solves this by directly exposing the file system and making the full path of selected files available without copying.
  • In some circumstances It might make sense to expose a subset of the server file system to the user in remote running apps (selecting old results or configuration files etc.). shinyFiles allow the developer to restrict the client access to a certain subdirectory of the full file system, by specifying a starting root, beyond which the client have no access. Furthermore subdirectories of the root can be removed as well as file-types to give fine-grained control over what is exposed to the client.
The functionality is designed to be extremely simple to implement, and makes it easy to toggle between fileInput and shinyFiles. If you're designing your html from scratch it only requires the addition of a single <button> element to make it work.

The visual side is designed to look great on bootstrap pages, but can be customised to your own needs. Furthermore the icons can be customised if you have your own icon set...

At the moment it is only available on github (use devtools to install), but it should be submitted to cran after some further testing. After installation you can run shinyFilesExample() to be presented with a minimal app showing the functionality.

I would welcome any feedback.

best

Thomas


Herman Sontrop

unread,
May 23, 2014, 2:57:39 PM5/23/14
to shiny-...@googlegroups.com
great! I tried it and it works well :-) thanks a bunch!

Op vrijdag 23 mei 2014 13:37:17 UTC+2 schreef Thomas Lin Pedersen:

Thomas Lin Pedersen

unread,
Jun 10, 2014, 7:30:37 AM6/10/14
to shiny-...@googlegroups.com
Just a quick update to those interested.

shinyFiles has now been submitted to CRAN and should hopefully be available soon.

New features since last post:
  • File sorting: Files can now be sorted by name, type, size, creation and modification date.
  • Volumes: Support for multiple different roots to emulate different volumes on the file system. Furthermore a utility function getVolumes() that automatically detects the volumes available on the system.
  • Responsive: The file chooser now responds to changes in the file system. Plug in a USB drive and see it appear in the list of available volumes; Delete a file on the host computer and see it disappear from the file chooser.
As always type: shinyFilesExample() for a simple example of the file chooser.

best

Thomas

Practicalwings

unread,
Mar 8, 2016, 8:59:55 PM3/8/16
to Shiny - Web Framework for R

Hi Thomas, 

This is a fantastic package you got there and i'm benefit a lot from using it. I want to thank you for making this available, what an awesome package!

I do have a question relating to this package and I'm hoping that I can pick your brain. 

When using Shinyfiles package, everything works well on my local machine that I am able to navigate to my local desktop to locate the file directory. However, when I deployed the application to the web on shiny server, the end user is not able to navigate to their local desktop to select the desired directory. 

My understanding is that the ShinyFiles package only handle navigation of the server-side file system, so it will always show the file system of the system the app is running on (hence showing the local shiny director when it is deployed to the web). 

Can you suggest a way that I can mitigate the navigation such that the end users can still navigate to their local drive using a deployed Shiny application?

Thanks!

Huidong TIAN

unread,
Mar 9, 2016, 4:32:36 AM3/9/16
to Shiny - Web Framework for R
Great! Thanks.
Reply all
Reply to author
Forward
0 new messages