OneDrive Graph API to detect if file is opened by any user before moving to other folder - onedrive

I am using OneDrive REST API to upload and share document with multiple users. I need to move the document from one folder to another folder after all users finish their edits. This action will be initiated by user, however it fails if any user kept open the document or it was stuck in office upload center (Desktop client).
Is there any way to detect if the item/document is busy before attempting to move? Is there any OneDrive API available to detect which user opened the document?

Related

upload files to any user's google drive after they authenticate

I want to upload files from my server to my users's google drive storage, after they authenticate, the questions are:
Is it possible to do that?
Do I have to re-authenticate the user every time they like to upload a new file?
Could I embed the uploaded MP4 files in my website? (using the html video source as the file's download link of the user's google drive account)
do I need to re-authenticate the user if they just want to see the embedded videos some time later, in other words, is there anyway I could save some sort of a Token so they don't keep doing that.
Is it possible to do that?
Yes
Do I have to re-authenticate the user every time they like to upload a new file?
No, store a refresh token for the user and they wont need to authenticate each time.
Could I embed the uploaded MP4 files in my website? (using the html video source as the file's download link of the user's google drive account)
I wouldn't recommend it google drive isn't really designed for hosting of files in this manner that and people would need access to the file to download it anyway, its a big can of worms.
do I need to re-authenticate the user if they just want to see the embedded videos some time later, in other words, is there anyway I could save some sort of a Token so they don't keep doing that.
Yes as mentioned if the files are uploaded to your drive account you own them. You would need to share the files with anyone that you want to have access to them. You could set the files to public but thats not the best way to go about this.
Reference
Using OAuth 2.0 to Access Google APIs

How to open documents with Office365 in my web application?

We have a cloud based audit application. While performing audit a user typically uploads a lot of documents. Currently in order to view the documents he has to download them. Business requirement is that on clicking the document it should directly open up in another browser tab using office 365 just like dropbox/onedrive. The user should be able to view, edit, save it on server (without downloading) and close it. How to achieve that in our application?
Our webapp is built using ReactJS, NodeJS & MongoDB. Whenever a user uploads a document it gets saved in a AWS S3 bucket.
I went through Microsoft Graph API and OneDrive RestAPI's. Looks like the only solution is to use the OneDrive API's to save files in OneDrive instead of S3. And then it should allow you to use the Office365 apps. Is this the right solution? Am I missing anything?
Is there any other solution?
While the easiest solution is indeed to store the documents in OneDrive, there's also another way. You can enroll in Microsoft's Cloud Storage Partners Program and implement the WOPI protocol on your service. This would allow the Office Online viewers/editors to integrate with your service's data directly.
You need to use both aws and O365 api to reach a working solution. Try the following steps (PS: I have not tried this. But I have saved edited documents from Office 365 to AWS)
Read the uploaded document from AWS using AWS api's and upload it to office doc using office doc api.
Edit the doc using office docs api.
Save the doc back to S3

upload file to google drive without human interaction via SDK

I want to upload files to google drive. I'm using C# and have referred following links to get started
https://developers.google.com/drive/v3/web/quickstart/dotnet
https://developers.google.com/drive/v3/web/manage-uploads
I'm able to upload the file successfully to google drive but my main concern is I don't want to display any sort of UI/human interaction. It should be able to automatically upload the file.
Using OAuth2.0 there is a need that we have to manage and generate access/refresh token. I have no idea how these should be managed.
Isn't there any other way where the user can have access to google drive programmatically just by sharing his/her Gmail account username/password to achieve this?
Isn't there any other way where the user can have access to google drive programmatically just by sharing his/her Gmail account username/password to achieve this?
No there is not
The user needs to authorise your app one time. After that, you can save Refresh Token and use that for future unattended use.

Is there a way to create a Dropbox link that opens a file or a folder in the native app?

Basically, what I would like to do is to create a link from a web application that will open a Dropbox file from appropriate Dropbox native app. Google Drive for example allows you to re-format the unique URL for a file such as https://docs.google.com/blablabla which you can retrieve from their API, into googledrive://docs.google.com/blablabla and lets you open the file in Google Drive native app.
I have tried dropbox:// URLs with no success, and have not found any existing conversation on this despite running cross multiple conversations on the same subject for Google Drive or Evernote. Please let me know if it is possible to somehow generate this via API or based on the folder structure etc.
Thanks!

Using dropbox Chooser drop-in to retrieve a non-expiring link to files

I would like to use the Chooser drop-in to select a file from dropbox and then synchronize my app with that file occasionally in the background.
https://www.dropbox.com/developers/dropins/chooser/js
A scenario would be:
List item
User selects file.
File uploads to my app.
User returns to my app a few days later after modifying the file in dropbox.
My app should synchronize and pull down that particular file (without again displaying the Chooser drop-in).
The problem is that the Chooser provides an expiring link to the file:
"direct" is an expiring link to download the contents of the file
I can use the Core API exclusively which would work, however I would have to build my own UI to browse the user's dropbox directory. Ideally, I'd prefer to not introduce the world to another file browser; Dropbox has a file browser - and people are familiar with it. Is this possible?
Thanks,
You can just get a preview link and convert it. See https://www.dropbox.com/developers/blog/53/programmatically-download-content-from-share-links.