-
Notifications
You must be signed in to change notification settings - Fork 48
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
drive_upload
doesn't use file extension when type
is NULL
#207
Comments
Hmm ... can you create an example to illustrate your concern? My mind is far away from this right now. But I think you may be correct that if we don't send a MIME type, then we're relying on Google Drive to determine if from file extension. In any case, would be easier to discuss in the context of "here's what I expect" vs. "here's what actually happens". |
I believe this statement is based on how |
Here's my use case. I'm using Google's Colaboratory in Drive. Colab notebook is usually stored with file extension This mime type is not included in What I want to achieve is when I My initial thought is that if @LucyMcGowan You're right that In the meantime, I'm wondering if I should also send a PR to |
I think we were relying on some combination of the Google Drive API and
But it's clear that neither Drive nor httr is expecting MIME type I think the first thing to do is to teach googledrive about this MIME type, so that a direct specification works. I'm hesitant to explicitly set MIME type based on file extension, in general, because then I own that logic/data, whereas I think it really belongs upstream. |
You can now upload Colaboratory notebooks like so:
It still won't work automatically based on file extension because googledrive doesn't actually have any of that logic. That would require the Drive API to recognize Colab notebooks or a PR into the |
drive_upload()
documentation says that file extension is used to determine type whentype
isNULL
(see here).This line of code determines the type included in params. It doesn't take into consideration the file extension. When
type
isNULL
,drive_mime_type
simply doesn't return anything.I might be interpreting the documentation in a wrong way. Does it mean that the extension would be used by Google Drive rather than the
googledrive
package to determine the mime type? I was expecting to see something similar to whatdrive_download()
has.The text was updated successfully, but these errors were encountered: