Open jimmywarting opened 1 year ago
I maybe also even want to switch up the service worker to two solutions: using transferable streams or just the MessageChannel solution
The transferable stream don't require the service worker to stay alive and pinging it with postMessages.
so maybe: ['native', 'sw-transferable-stream', 'sw-message-channel', 'constructing-blob']
I sometimes get some confusing question on github issues as i most often have to guess what method of choices they use in order to save the files.
there are currently 3 method in place, 1) native 2) service worker 3) building a blob So it gets a bit hard to trying figuring out the path it takes.
so i want to switch out
_preferPolyfill: false
topreferedMethods
Perhaps later then we could maybe even throw in dropbox and google drive methods into the mix then if something like that ever comes up
Originally posted by @jimmywarting in https://github.com/jimmywarting/native-file-system-adapter/issues/59#issuecomment-1533145174
i want
service-worker
to be explicitly opted out as it requires more things to be set up in order to work correctly. and i also want this field to be required and not fallback to any default methods. so_preferedMethods
will be a required field. But that would maybe perhaps be a too breaking change. perhaps maybe just do aconsole.warn()
and set the default to using['native', 'constructing-blob']
A problem with not using prefered method are that the service worker solution might not just work if folks install a service worker. cuz we only do feature detection by the occurrences if a service worker is installed or not. not by the fact that they have implemented the push algoritm.