從 ERP 保存到 OneDrive (Save to OneDrive from ERP)


問題描述

從 ERP 保存到 OneDrive (Save to OneDrive from ERP)

我們希望將文檔保存到單個 OneDrive 文件夾中。

當前:用戶“Tim”在我們的 ERP 系統中從客戶“TomCompany”生成客戶概覽(上次訪問、收入等),它將自動保存在 FTP 文件夾中。他現在可以在他的 iPad 上使用 Good Reader 在客戶站點上查看此文件。

計劃:第一步:客戶概覽應直接保存到 OneDrive,而不是 FTP 文件夾。第二步:每個銷售人員都有自己的 OneDrive 帳戶,因此應將其與用戶參數等一起保存到自己的帳戶中(這在我們的 ERP‑API 中管理不是問題)。

問題是:是否可以從不同的系統(如 ERP)連接到 OneDrive。“帶有身份驗證的 SaveFileToOneDrive”


參考解法

方法 1:

You can 'connect' to OneDrive through the given API with JavaScript.

Here is an example: https://dev.onedrive.com/sdk/js‑v7/js‑picker‑save.htm . You can now add the 'Save to OneDrive' button on every page you need it.

If not noticed yet, some examples for the API: https://dev.onedrive.com/sample‑code.htm

Hope this helps you to solve your (for me still unknown) problem ;‑)

方法 2:

I implemented own windows live API because of I found some problems with standard live api. It is based on REST API so there is layer with objects (file, folder, etc...) and each object has some equipment (i.e. file has method for upload and download file). Second layer is for communication with server side and object layer send requests into second layer which send it into server. Server sends response and second layer return this response into object layer. I implemented onedrive function mainly because of I developed application which uploads some files into onedrive.

So it is very simple to use it. I describe it on webpage https://wlivefw.codeplex.com/ You can sign as user which onedrive want to use by connection object. Then you will need folder id where you want to create new file. Then you create file object with parent_id set to folder id, name (is required) and description (optional). And now you call File.Create(file object which you created, Stream object ‑ data of origin file, OverWriteOption ‑ if you want to overwrite file if exists or not or create with new name, and progress handler ‑ delegate to method which you want to invoke when progress changed).

File uploading is implemented by BITS protocol, so you can upload file greater than 60MB. File is uploaded by fragment so if fragment uploading fails you can very easy send this fragment again ‑ in exception when uploading fails is delegate to continue method which continue upload from last successfull fragment.

I would like to improve this library so library is free to use as well as source code. Please if you will expand this library send me your changes and I will build new version, etc... Thank you and I hope it is usefull.

(by ThankfulzyproZefek)

參考文件

  1. Save to OneDrive from ERP (CC BY‑SA 2.5/3.0/4.0)

#onedrive #erp






相關問題

WP7-Skydrive API 下載任何文件並保存隔離存儲 (WP7-Skydrive API Download Any file and Save Isolated Storage)

如何編寫 .NET 控制台應用程序來訪問 SkyDrive? (How can I write a .NET console application to access SkyDrive?)

Loại đăng nhập Skydrive API Windows 8 (Skydrive API login type Windows 8)

如何使用 Rest api 和 oauth2.0 創建文件夾和上傳文件 (How to create folder and upload file using Rest api and oauth2.0)

從 ERP 保存到 OneDrive (Save to OneDrive from ERP)

適用於 Windows 通用 APP 的 OneDrive Api (OneDrive Api for Windows Universal APP)

一種 Drive / Office365 與 Google Apps Script 類似的腳本語言 (One Drive / Office365 similar scripting language as the Google Apps Script)

OneDrive API 瀏覽器 C# (OneDrive API browser C#)

從 Python 應用程序訪問 Microsoft Live 服務 (Access Microsoft Live services from Python application)

一個驅動器 api 安全 URL (One drive api secure url)

嘗試使用 get-PnPFile 從 OneDrive 獲取文件的所有版本時找不到文件 (File not found trying to get all versions of a file from OneDrive using get-PnPFile)

一個驅動器遷移 (One Drive Migration)







留言討論