我們很高興地宣布 下一代 GroupDocs.Storage Cloud 18.3。它是一個新的和改進的 REST API,用於在雲應用程序/網站中執行不同的存儲相關操作。以下是下一代 GroupDocs.Storage Cloud 第一個版本中提供的一些主要功能。有關下一代 GroupDocs.Storage Cloud REST API 提供的功能的完整詳細信息,請查看 文檔API 參考

上傳特定文件

您可以使用 Groupdocs.Storage Cloud API 輕鬆將文件上傳到您首選的雲存儲。為此,請參閱以下 REST 命令(Curl)和 SDK 示例。

其餘示例(cURL)

curl -v "[https://api.groupdocs.cloud/v1.0/storage/file?path=testfile.doc"](https://api.groupdocs.cloud/v1.0/storage/file?path=testfile.doc)
-X PUT \
-T C:/testfile.doc \
-H "Content-Type: multipart/form-data" \
-H "Accept: application/json" \
-H "authorization: Bearer xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx” 

.NET SDK 示例

var configuration = new Configuration { AppSid = Sid,AppKey = Key};
StorageApi apiInstance = new StorageApi(configuration);
try
{
PutCreateRequest request = new PutCreateRequest();
request.Path = "testfile.doc";
request.File = File.Open("D://testfile.doc", FileMode.Open);
request.VersionId = null;
var response = apiInstance.PutCreate(request);
Debug.Print("File Uploaded: " + response.Code.ToString());
}
catch (Exception e)
{
Debug.Print("Exception while calling PutCreate: " + e.Message);
} 

下載特定文件

GroupDocs.Storage Cloud API allows you to download specific file from your preferred cloud storage. Please note by default API works with GroupDocs Cloud Storage. If you want to use a Cloud Storage other than GroupDocs Cloud Storage, you need to configure Third Party Storage with Groupdocs for Cloud. Please follow the instructions at this page to configure your required storage. Please see the following REST command(Curl) and .NET SDK example for downloading a particular file. 其餘示例(cURL)

curl -v "[https://api.groupdocs.cloud/v1.0/storage/file?path=signature.jpg"][6] \
-X GET \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "authorization: Bearer xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx” 

.NET SDK 示例

var configuration = new Configuration { AppSid = Sid,AppKey = Key};
StorageApi apiInstance = new StorageApi(configuration);
try
{
GetDownloadRequest request = new GetDownloadRequest();
request.Path = "signature.jpg";
request.Storage = "MyStorage";
request.VersionId = null;
var response = apiInstance.GetDownload(request);
Debug.Print("Result as System.IO.Stream: " + response.Length.ToString());
}
catch (Exception e)
{
Debug.Print("Exception while calling GetDownload: " + e.Message);
} 

軟件開發工具包

GroupDocs.Storage Cloud API 提供 SDK 以在您喜歡的平台中使用其功能。目前包括.NET 和PHP SDK。我們正在推出適用於其他流行平台(例如 Ruby、Java、Python 等)的 SDK。這些 SDK 以及工作示例託管在我們的 GitHub 存儲庫上,以便您立即開始使用。 GroupDocs.Storage Cloud SDK 包括以下功能:

  • SDK 與 API 參考完全同步
  • 類、方法和屬性有註釋並且對 IDE 友好
  • 使用請求/響應類來表示長參數列表。
  • 源代碼中的許可免責聲明
  • 我們的 SDK 支持 OAuth 2.0 身份驗證

API瀏覽器

GroupDocs Cloud 提供了一個 Web API 瀏覽器,可以立即在您的瀏覽器中試用我們的 API。它是 GroupDocs Cloud API 的 Swagger 文檔集合。使用Web API資源管理器,您可以獲取有關API中所有資源的信息。它還為我們的 API 端點文檔提供測試和交互。請單擊此處探索 GroupDocs.Storage Cloud API。

GroupDocs.存儲雲資源

以下是完成任務可能需要的一些有用資源的鏈接。

立即開始免費試用

立即開始免費試用 – 您只需註冊使用 GroupDocs 雲服務。註冊後,您就可以嘗試 GroupDocs Cloud 提供的強大文件處理功能。