我们很高兴地宣布 下一代 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 提供的强大文件处理功能。