GithubHelp home page GithubHelp logo

huaweicloud-sdk-dotnet-obs's Introduction

Version 3.22.3

New Features: 1.Support Content-Disposition standard metadata interface;


Version 3.20.7

New Features:

  1. Added the following APIs for checking whether an object exists: ObsClient.HeadObject, ObsClient.BeginHeadObject, and ObsClient.EndHeadObject.

Documentation & Demo:

  1. Added the section about the APIs for checking whether an object exists.

Resolved Issues:

  1. Fix ObsClient cannot release TCP connection in time under .Net Framework.
  2. Fix the issue that resumable download in poor network environment.
  3. Fixed the issue that message and code fields in the error messages are occasionally empty.

Version 3.19.7.1

Resolved Issues:

  1. Fixed the issue that an error message is reported indicating unmatched signature when an object with special characters is operated through the URL generated by calling ObsClient.CreateTemporarySignature.

Version 3.19.7

Resolved Issues:

  1. Fixed the null pointer issue of the API for downloading an object in asynchronous mode (ObsClient.EndGetObject).

Version 3.1.3

Resolved Issues:

  1. Modified ObsClient.PutObject to prevent upload issues when the Chunk mode is not supported by the server.

Version 3.1.2

New Features:

  1. FunctionGraph configuration and query are supported in the bucket event notification APIs: ObsClient.SetBucketNotification and ObsClient.GetBucketNotification.

Documentation & Demo:

  1. Added the description about FunctionGraph configuration to the event notification section in the Developer Guide.

Resolved Issues:

  1. Fixed the issue that the bucket creation API ObsClient.CreateBucket returns incorrect error information due to protocol negotiation.
  2. Rectified the error in the sample code BucketOperationsSample.cs.

huaweicloud-sdk-dotnet-obs's People

Contributors

glovethu avatar goodcode-best avatar noaccident avatar x00403408 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

huaweicloud-sdk-dotnet-obs's Issues

断点续传 遇到一点小问题

使用场景:每次上传未知数量的Dicom文件,几张-几千张不止,每个小文件也是100K到10M不止,使用了断点续传,因为客户网络不是很稳定。
出现问题:NoSuchUploadThe specified upload does not exist. The upload ID may be invalid, or the upload may have been aborted or completed.
但是呢,文件已经上传到OBS上了。
求如何解决?
版本3.20.7

分段上传问题

分段上传,使用obs3.+,每段大小200KB,上传到了指定桶中(通过工具桶碎片中有了对应的碎片),但是却在使用ObsClient.CompleteMultipartUpload合并段时,捕获到异常—— Specified method is not supported

❓ 求解为什么会这样,官方文档上不是写支持最小100KB了么。

🙏 此外, 项目能否写的规范一点以及对象操作支持异步,最好能发布到nuget上。

请问该SDK有nuget包吗?

nuget中搜素有对应的nuget包,但是官网SDK文档中没有指出具体是哪一个?使用第三方包担心存在风险。请问该SDK有nuget包吗?

obs的包发布到nuget

从nuget上搜索看到HuaweiCloud.SDK.OBS包名被占了,而且已经近三年没有更新过。除此之外,应该所有华为云的sdk都发到了nuget。为何不联系nuget将HuaweiCloud.SDK.OBS撤下来,然后由你们发布新的包。

framework sdk 上传文件时,设置头部错误。

在上传word文档的时候,客户端重新设置了content-type头部。
但是HttpWebRequest的Content-Type头部不能通过Add方法设置,必须通过专有属性ContentType设置。

如图:
image
image

环境:
OS:win11
dotnet sdk: .net framework 4.8
sdk: obs-sdk-.net/3.20.7

cant create instance of ObsClient

image
I have used System.IO.Stream as the namespace and import esdk_obs_.net.dll according to your documentation but still, ObsClient is not accessible to create its instance, what do I need to do now?

请问.Net版,创建桶提示“This stream does not support seek operations.”错误码空能是什么问题.

完全用的官方代码测试的。

 private static ObsClient client;
    private static string bucketName = "my-obs-bucket-demo";   

public void Setup(string accessKeyId, string secretAccessKey, string securityToken, string endPoint)
    {
        client = new ObsClient(accessKeyId, secretAccessKey, securityToken,endPoint);
    }
      
  static void CreateBucket()
        {
            try
            {
                CreateBucketRequest request = new CreateBucketRequest()
                {
                    BucketName = bucketName
                };
                CreateBucketResponse response = client.CreateBucket(request);

                Console.WriteLine("Create bucket response: {0}", response.StatusCode);
            }
            catch (ObsException ex)
            {
                Console.WriteLine("Exception errorcode: {0}, when create a bucket.", ex.ErrorCode);
                Console.WriteLine("Exception errormessage: {0}", ex.ErrorMessage);
            }
        }

能把项目写好一点嘛?

我服了。
要写SDK,就用 Standard,别用 .NET Core app 行么,生成的 Dll 用类库项目调不了。
image
你这项目结构乱七八糟的:
image

Does not support Task Based (async/await) pattern

Hi;

Our company bought Huawei S3 storage and we want to use it. But this library very old and does not support the async/await task based approach.

Is it in development backlog. What is the estimated time of release?

Kind regards.

.net版,断点续传进度 要如何放到独立的线程中?

https://support.huaweicloud.com/sdk-dotnet-devg-obs/obs_25_0412.html

UploadProgress 中的Console输出,必须要等上传完成后,才会把上传过程依次打印出来。

除了放到另外的线程中,还有什么方法实时输出上传进度吗?就是不要卡死在华为的线程中...

 // 注册上传进度回调函数
    request.UploadProgress += delegate(object sender, TransferStatus status){
        // 获取上传平均速率
        Console.WriteLine("AverageSpeed: {0}", status.AverageSpeed / 1024  + "KB/S");
        // 获取上传进度百分比
        Console.WriteLine("TransferPercentage: {0}", status.TransferPercentage);
    };

异步下载,IAsyncResult ar 报错

异步上传正常,异步下载报错,3.1版本和最新的3.20版本都报错
c#项目,首选32位,允许不安全代码
client.BeginGetObject(request, delegate (IAsyncResult ar) {
GetObjectResponse response = client.EndGetObject(ar);
}, null);ar报错,
AsyncWaitHandle “((OBS.Internal.ObsAsyncResult<OBS.Internal.HttpResponse>)ar).AsyncWaitHandle”引发了类型“System.ObjectDisposedException”的异常 System.Threading.WaitHandle {System.ObjectDisposedException}
未将对象引用设置到对象的实例

ObsClient生命周期

请问ObsClient适合用什么样的生命周期?
官方的文档和例子都没有一个说明?
单例?瞬时?还是作用域?
还有对于上传和下载的文件流,是否需要调用Dispose接口,释放非托管资源?官方文档也没有说清楚

ObsClient初始化报异常

init(accessKeyId, secretAccessKey, securityToken, obsConfig){
...
LoggerMgr.Initialize();//这里初始化异常
...
}
Assembly assembly = Assembly.LoadFile(Environment.CurrentDirectory + "/log4net.dll");
这个读取失败Environment.CurrentDirectory。不能使用这个获取当前路径。

QQ图片20211101171638

分页列举全部对象报错

ListObjectsRequest request = new ListObjectsRequest(); request.BucketName = bucketName; request.MaxKeys = 100; ListObjectsResponse response; do { response = client.ListObjects(request); foreach (ObsObject entry in response.ObsObjects) { ... } request.Marker = response.NextMarker; } while (response.IsTruncated);

do执行第二次时在 response = client.ListObjects(request); 处发生异常:
TargetInvocationException: 调用的目标发生了异常。
XmlException: “.”(十六进制值 0x00)是无效的字符。 第 1 行,位置 22383。

上传时报错,Only one usage of each socket address (protocol/network address/port) is normally permitted

使用C# 3.20.7的SDK,每秒上传200个大概30K的文件,在上传8000多个对象后,就开始报错。内容是: Only one usage of each socket address (protocol/network address/port) is normally permitted.

网上查了下,大概是因为端口占用太多。

使用netstat -a查询,确实看到有大量端口连接到OBS,并处于TIME_WAIT状态。

等待两分钟后,又能继续上传。但上传8000+对象后,又继续报错。

是否是SDK里未及时关闭端口?

设置防盗链时GetObject报错AccessDenied

sdk:HuaweiCloud.OBS.SDK
version:3.20.7
platform:.net 7
问题:当设置防盗链时,实时预览没问题,api请求GetObject获取文件报错,禁用防盗链后请求成功。
ErrorMessage:Specified method is not supported.
StatusCode:Forbidden
问题点:请求头Headers缺少Referer参数,当我手动加上Referer参数后,api请求成功

请问除了这个方法之外,还有什么其他办法。
希望能在sdk中开放请求头参数。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.