You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
box_write() is a convenience wrapper around box_ul(), which uses this API endpoint. Today box_ul() handles both uploading new files and updating existing files (which are slightly different requests). You are correct that you can update with a file_id. But you can't upload a new file by a file_id.
Would you want to rework box_ul() so it would decided whether to update or upload new based on the presence/absence of file_id = or create a new function like box_update(file, file_id)?
I'm skeptical about changing the behavior of box_ul() because it's core function not only for users but other boxr functions like box_push(). What do you think?
I think that sounds nice, something like if (!is.null(file_id)) box_update(...). I'd welcome a PR for review.
I'm not sure name will work this , because at the API level names aren't unique enough. I know box_push generates a directory diff to emulate the by-name look up, but that starts to feel like a different problem. What do you think?
FWIW I've always saved objects locally and relied on box_push to sync local/remote, could that be a solve/hack in your workflow?
Currently box_write requires a file_name and dir_id.
The API documentation suggests it's possible to specify a file_id instead.
It seems non-symmetric that box_read can handle a file_id but box_write cannot.
Let me know if you would like me to attempt a pull request to solve this.
The text was updated successfully, but these errors were encountered: