Repository navigation
WIP: drive: upload documents and document links - #2479
Conversation
It did didn't it ;-)
That sounds sensible to me.
Absolutely. As long as it satisfies the interface (and any optional interfaces we need on that Object) then I'm fine with that. I think if the split object design makes the code cleaner then let's go with it. In drive, gdocs and drive objects are quite different things so I think having two object types makes perfect sense. If you want to push this to a branch on I think clear docs are going to be quite important for this feature! I see this deprecates |
Perfect. I put interface checks at the bottom of
I will do that. Just need to make sure people know that the new features (and maybe the whole drive remote) are experimental and can contain serious bugs.
Definitely. There are many details hidden from the users behind the
At some point
|
8530ea5 to
a3eaf3f
Compare
|
The next iteration of changes is done. I found another half dozen bugs and fixed the handling of apps-scripts. The documentation is also updated. This PR should now be ready to be tested. I will upload it as a beta branch soon and link it in the related issues. @ncw Should I merge cd8c955 and d1e708a into master already? They don't change the current behavior and would shrink the diff of this PR a bit. |
|
Happy for you to merge those commits after I get the release out the door (should be today hopefully!) |
a3eaf3f to
6a66967
Compare
|
OK the release is done! Happy you for you to merge away :-) |
6a66967 to
9a083bd
Compare
|
Is this ready to merge @B4dM4n ? |
Make use of the mime package to find matching extensions and mime types. For simplicity, all extensions are now prefixed with "." to match the mime package requirements. Parsed extensions get converted if needed.
Add a new flag to the drive backend to allow document conversions oni upload. The existing --drive-formats flag has been renamed to --drive-export-formats. The old flag is still working to be backward compatible.
9a083bd to
75b793c
Compare
|
There didn't arise new bugs since the last iteration in my testing and no other reported problems. I rebased the code and it should be ready for beta. |
|
OK I'll merge that now and we can keep an eye on bug reports and the integration tests :-) Thank you :-) |
|
Is the |
This has become a bigger change than thought at first.
To address #1349 #2046 and #1065 I rewrote many parts of the drive remote since the current state became to cluttered with all features stacked on top of it.
The two major things rewrote are the mime-type handling and splitting
Objectinto smaller functional types.The mime-type handling is now done by the
mimepackage which makes use of the system wide mime-types. The basic mime-types that got used before are still registered.The
Objecttype is now split into 3 types and onebaseObject.baseObjectis embedded by all other objects and contains the shared fieldsObjectnow only represents a generic file without document handlingdocumentObjecthandles google docs. This still has asSizeof-1, which gets updated after read.linkObjectcontains the new link file handling. Currently implemented are.desktop,.link.html(added.linksince.htmlis a valid export format),.urland.weblocfiles. I could only test.link.htmluntil now, but will test.desktopand.urlsoon.Since this is a big change and not yet complete I don't think we should merge this before the
v1.43release.@ncw How do you like the split
Objectdesign. Are you fine with returning other concrete types besides*Objectasfs.Object?TODO:
--drive-import-formats.urllink files on Windows.desktoplink files on Linux.urland.webloclink files on MacOSapplication/vnd.google-apps.scriptexport/importsync?Examples:
By default the conversion to Google Docs is only allowed when the uploaded file gets the same file type (determined by
--drive-export-formats) as the source.To upload
.docfiles as Google Docs use.docas export and import format:To allow upload of multiple file types as Google Docs,
--drive-allow-import-name-changehas to be used:Using the link files works by specifying the link file extension as a
--drive-export-formats:This also works for
mount: