通过 .NET API 将文件上传到 Documentum

发布于 2024-12-10 07:46:06 字数 289 浏览 4 评论 0原文

我希望通过 .NET API 将文件从 SharePoint 上传到 documentum 并寻找可能的选项。

我遇到过以下解决方案:

  • Documentum 互操作程序集(我听说它们将被弃用)

  • codeplex 解决方案

谁能告诉我首选方法及其相关协议(HTTP、TCP)?

I am looking to upload a file from SharePoint to documentum via .NET API and looking for possible options.

I have come across these solutions:

  • Interop Assemblies for Documentum (I have heard they will be deprecated)

  • This codeplex solution

Can anyone tell me the preferred approaches and their associated protocols (HTTP, TCP ) ?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

完美的未来在梦里 2024-12-17 07:46:06

我不熟悉 Documentum,但理论上,如果您可以执行 HttpRequest(PUT 操作),您可以将文件上传到任何系统。这是一个例子:

string localFilename = "<path to file you wish to upload>";
// ex. c:\temp\myFileToUpload.doc

FileStream myStream = new FileStream(localFilename, FileMode.Open, FileAccess.Read);
BinaryReader myReader = new BinaryReader(myStream);
byte[] bytesToOutput = reader.ReadBytes((int)myStream.Length);
myReader.Close();
myStream.Close();

using (WebClient client = new WebClient())
{
    client.Credentials = System.Net.CredentialCache.DefaultCredentials;
    client.UploadData(uploadPath, "PUT", bytesToOutput);
}

i'm not familiar with Documentum, but theoretically you can upload files to any system if you can perform HttpRequest's (PUT operations). Here's an example:

string localFilename = "<path to file you wish to upload>";
// ex. c:\temp\myFileToUpload.doc

FileStream myStream = new FileStream(localFilename, FileMode.Open, FileAccess.Read);
BinaryReader myReader = new BinaryReader(myStream);
byte[] bytesToOutput = reader.ReadBytes((int)myStream.Length);
myReader.Close();
myStream.Close();

using (WebClient client = new WebClient())
{
    client.Credentials = System.Net.CredentialCache.DefaultCredentials;
    client.UploadData(uploadPath, "PUT", bytesToOutput);
}
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文