Closed iamacarpet closed 1 year ago
I've been working on this today and have a basic version working for just OneNote documents.
https://github.com/a1comms/chromeos-filesystem-onedrive/tree/openweblink
It currently registers a new file extension, ".onedriveweblink", handled by this same extension.
When the file is read, it internally handles returning the file contents as the web URL (via a padded string), which is then re-read by the file extension handler and popped into a new browser window.
I wouldn't list two files; that'd be daft, but you could have a configurable option in the settings panel - checkbox? for "Open office files in office online" on/off.
If the webUrl value isn't null, then the default open action for that file should be the URL... ?
I had never looked into this, hoping that MS would actually fix their own extension; but they never did.
Yes you are probably right about the setting to turn it on/off being the best option.
I don't think it's as simple as if webUrl is null - that's what I'd hoped for too, but it looks like nearly everything has a webUrl set, like images, PDFs, etc.
It currently looks at a value set for a web only file (like OneNote Notebooks) that aren't actually files that can be download (i.e. downloadUrl is null), however the main thing to support next is Word, Excel & Powerpoint, which I think you'd probably be best to do via their mime types?
This is next on my list... I REALLY want it to open Office365 docs that way.
I was a bit way-laid by google and privacy - which is a good thing, it got me back into this.
Implemented
Is your feature request related to a problem? Please describe. Several files in my OneDrive don't have download URLs, so they won't open.
This is mainly for the OneNote notebooks, which don't show as having a file extension, either. Describe the solution you'd like From the Microsoft Graph API, their metadata returns a
webUrl
to open in the Office Online apps.I'd like to be able to double click those files and it to trigger it opening in Office Online via a new browser tab directly to the document.
Initially just for the OneNote documents, but ideally, it'd be great for it to be possible with all Office Online compatible documents (i.e. Excel spreadsheets) - although, I've considered you'd also want to be able to access the raw file too, so you could move it between storage locations for example (like to a USB drive), so it'd need to support both. My suggestion here might be to list two files, one that is the actual file and one that is the link to the web, distinguished by the file extension.
Describe alternatives you've considered It seems otherwise you have to visit OneDrive on the web and open via that, but it's a bit clunky and kind of defeats the object of the mount.