Py3, how to save to local documents avoiding oneDrive - python-3.x

I am trying to save log files to the user/documents directory on corporate client laptops running Windows 10 but if oneDrive is active, it grabs the entire documents folder structure. It is impossible to know if the laptops have onedrive or not.
Question: Is there a way to bypass onedrive and save to the local documents dir?
Currently I am having to test if the client has onedrive or not.
It would be helpful if I could make the code agnostic about this issue and always save to local user documents directory.

Related

linux onedrive monitor does not maintain original directory structure

Having installed onedrive on Ubuntu I have noted that the monitor function works quite well but does not maintain the directory structure on the remote onedrive system. I have two directories defined in the local onedrive folder. If I create or copy a document into one or other of these directories then onedrive monitor will upload it to the remote server but they appear at the top level and not in synced folder from which they came. Is there a way to configure onedrive to have it respect the source directory structure?
Having installed onedrive on Ubuntu
Hopefully you followed the correct installation procedure as documented here: https://github.com/abraunegg/onedrive/blob/master/docs/ubuntu-package-install.md
I have noted that the monitor function works quite well but does not maintain the directory structure on the remote onedrive system. I have two directories defined in the local onedrive folder. If I create or copy a document into one or other of these directories then onedrive monitor will upload it to the remote server but they appear at the top level and not in synced folder from which they came.
This is very odd - as, the folder that is containing those document is what should be replicated to OneDrive online.
Please follow the correct support process as detailed on GitHub: https://github.com/abraunegg/onedrive

How to trigger Azure Logic App when dropping file in Sharepoint folder

I created a Logic App that uses the Sharepoint trigger "When a file is created or modified in a folder". It works perfectly when I upload a file in Sharepoint online (in a Sharepoint browser tab). But, it doesn't work when I drop a file in my synced Windows explorer folder.
I read that someone faced the same problem: https://learn.microsoft.com/en-us/answers/questions/41215/logic-app-why-does-sharepoint-file-properties-trig.html. Here it says:
Move files and flow runs When you move one or more files from one
document library to another, the original file is moved from the
source library to the destination library. Moving the file does not
alter any custom metadata, including when the file was created and
modified. Hence, this action does not trigger any flows for those file
updates associated in the library where it was moved.
Syncing files to your OneDrive for business and SharePoint document
libraries When users sync one or more files from one document library
to another, the original file is moved (synced) from your client to
the destination library. Syncing the file will not alter any custom
metadata including when the file was created and modified. Hence, this
action will not trigger any flows for those file syncs in that library
or in your OneDrive for business.
The thing is that I NEED this Logic App to run by just dropping this file in a Windows Explorer folder (which is a Sharepoint folder shared with a certain person). Do you know how can I achieve this?
It started working for me when I used the OneDrive - When a file is created Connector because we use OneDrive for Windows Explorer and need to include the folder where the trigger should be invoked. We must set Include subfolder to true if we want the trigger to be fired while adding any file to the subfolders.
Here are the screenshots of the logic app working
When adding file in subfolders
When adding file in root folder

Need help in developing a custom WebDav client using node.js

I am developing an open source application which should mount webdav share to local drive letter just like NETDRIVE and WEBDRIVE using node.js and electron-js, so in my application at present I am downloading all files from webdav share which takes a lot of time and not reliable for heavy data. Is there any other approach so that whenever user access a file, only that particular file should be fetched from webdav share, I’ve tried to display files meta data(dummy) structure in directory and kept that directory under file-watcher. So that when user tries to open a file then watcher should capture file open event to get which file was user trying to access, so that in background of application a service will triggered to fetch that particular file using file-path as reference, but none of them are unable to capture file open event. Is there any other approach to do so, correct me if I am in wrong direction.
Thank's
I think you want virtual file-system and recommend Dokan library.
Dokan is the start point of Windows virtual file-system application.
Open Source : Dokan (https://en.wikipedia.org/wiki/Dokan_Library)
Commercial: EldoS CBFS (https://www.eldos.com/cbfs)
Google, Naver use Dokan and NetDrive, RaiDrive(mine) use CBFS.

CachedFileUpdater doesn't work in OneDrive app on mobile?

There is a Cached File Updater contract which allows apps like OneDrive or DropBox to keep files in sync with remote repository when users change them though file pickers. It works roughly like this:
User gets a file using FileOpenPicker.
User changes file.
The source app gets notification that file is changed and uploads new file to backing storage.
However, while in official DropBox app this scenario works perfectly, in OneDrive app it doesn't. I'm getting UnauthorizedAccessException when try to get stream for read from a file. I understand some people actually able to change a file, but it doesn't get uploaded because only local copy changes.
So CachedFileUpdater is not implemented in OneDrive app? And if it's not, is it known issue and is there any workarounds for this?

Force sharepoint to save files in directory

I'd like to force sharepoint to save files in directory. Is there a way to do that?
I think about this scenario: users upload files to some list / library in sharepoint and automatically or by pushing "publish" the files are copied to some local server's directory.
Edit:
In other words i would like to connect sharepoint library with physical directory in server that runs IIS, so that files uploaded to library were seen in that folder.
I'm new to sharepoint.
Are you talking about Remote BLOB Storage? I have not tried this and assume that RBS can be enabled for a Site level only and not for individual document libraries. If you want this for a particular doc library, you can write an event handler to save the uploaded documents to file system and then remove the uploaded file.
Most likely you don't want to do this. If you're doing it in order to access the files from other applications, or having them show up in a users home directory or something, you can just map the document library as a network drive/web folder.

Resources