Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Difference in coding between shinyFilesChoose and shinyFileSave #195

Open
WilDoane opened this issue Sep 11, 2024 · 0 comments · May be fixed by #196
Open

Difference in coding between shinyFilesChoose and shinyFileSave #195

WilDoane opened this issue Sep 11, 2024 · 0 comments · May be fixed by #196

Comments

@WilDoane
Copy link

WilDoane commented Sep 11, 2024

There appears to be a small difference between the implementations of shinyFilesChoose and shinyFileSave where Save causes immediate evaluation of the triple-dots (...) arguments.

Choose defers creating the fileGetter until sendDirectoryData is invoked while Save immediately (and outside a reactive context) creates the fileGetter, thereby causing the evaluation of the triple-dots (...) arguments.

Is there a reason for this? Is it necessary?

Because of this, these two similar functions have different performance behavior in server code: shinyFilesChoose can rely upon reactive expressions in the ... arguments while shinyFileSave cannot.

image

shinyFileChoose <- function(input, id, updateFreq = 0, session = getSession(),

shinyFileSave <- function(input, id, updateFreq = 0, session = getSession(),

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant