English 中文(简体)
我如何利用这颗卫星向AWS S3上载荷提出签名。 NET API?
原标题:How do I generate my request signature for AWS S3 uploads using the .NET API?

I m使用亚马孙直线网APICA,将一些档案上载到S3。

然而,我拿到例外信息:。 我们计算的请求签名与你提供的签名不符。 检查贵关键和签署方法

我的法典如下:

    AmazonS3 s3Client = AWSClientFactory.CreateAmazonS3Client("myaccessid","mysecretid");
    List<string> allFileNames = ProcessFiles(@"c:Devpktest");
    foreach (string file in allFileNames)
    {                   

        PutObjectRequest putObjectRequest = new PutObjectRequest
        {
            BucketName = "rhspktest",
            FilePath = file,
            Key = file,
            Timeout = 3600000                       
         };

         try
         {
             using (S3Response response = s3Client.PutObject(putObjectRequest)) { };
         }
         catch (AmazonS3Exception ex)
         {
             Console.WriteLine(ex.Message);
         }

            Console.WriteLine(file);

      }
      Console.Read();

是否有东西可以立即证明我是错了吗?

加工渔业公司的方法只是把该名录的档案名称清单退回。

最佳回答

ProcessFiles回到了档案名称或完整的道路? 不管怎样,它不太可能有<代码>FilePath和Key。 应将同一事项放在一起。

。 应当让当地档案完全上载。 eg c:Devpktestmyfile.txt

<代码>Key是S3. egmyfile.txt上储存的文档名称。 或者,如果你想要保持相同的道路结构:Dev/pktest/myfile.txt (注)

问题回答

暂无回答




相关问题
Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

NSArray s, Primitive types and Boxing Oh My!

I m pretty new to the Objective-C world and I have a long history with .net/C# so naturally I m inclined to use my C# wits. Now here s the question: I feel really inclined to create some type of ...

C# Marshal / Pinvoke CBitmap?

I cannot figure out how to marshal a C++ CBitmap to a C# Bitmap or Image class. My import looks like this: [DllImport(@"test.dll", CharSet = CharSet.Unicode)] public static extern IntPtr ...

How to Use Ghostscript DLL to convert PDF to PDF/A

How to user GhostScript DLL to convert PDF to PDF/A. I know I kind of have to call the exported function of gsdll32.dll whose name is gsapi_init_with_args, but how do i pass the right arguments? BTW, ...

Linqy no matchy

Maybe it s something I m doing wrong. I m just learning Linq because I m bored. And so far so good. I made a little program and it basically just outputs all matches (foreach) into a label control. ...

热门标签