Giter VIP home page Giter VIP logo

dart-azblob's People

Contributors

gabediamond avatar kkazuo avatar netfreaker avatar sunlightbro avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

dart-azblob's Issues

Allow to use this lib by using an upload link directly

Hello,
I am using a web service hosted on AzureCloud and I am using a clientid/client_secret to get a token and then a url allowing me to upload a file,
so does can we use your lib with this scenario ?
I have an url like:

https://mystoragedev.blob.core.windows.net/bab5b619-3634-eb11-9fb4-501ac53c3bc8/a992fc63-1ee7-ec11-b656-501ac53ca96e/Files/ATestFile2.jpg?sv=2020-02-10&st=2022-06-09T08%3A12%3A22Z&se=2022-06-10T08%3A12%3A22Z&sr=b&sp=w&rscd=attachment%3B+filename%3D%22ATestFile2.jpg%22&rsct=image%2Fjpeg&sig=cu2x%2BrgOW4%2FDAlmQgar5u1%2BcHu86pezrA%2BdrtfwfGag%3D

but it seems with your lib I have to use a ConnectionString...

Content-Type header issue

This library has been really helpful so thanks for all the hard work on it!

I found an issue yesterday, which took a while to figure out what was going on.

I'm setting content type for an image upload, but when the signature is created it is adding an array object instead of the single content type. The server must strip the single content-type from the array before it computes the hash so it doesn't match.

`final mimeType = lookupMimeType(fileName);

  final azureStorage = AzureStorage.parse(cloudStorageAccount);
  await azureStorage.putBlob(blobUrl,
      bodyBytes: bodyBytes, contentType: mimeType);`

It's a simple fix to get firstOrNull to get the first content type (I can't see there being mixed types for this use case):

final ct = request.headers['Content-Type']?.firstOrNull ?? '';

Happy to raise a PR, I tried to create a fork but couldn't push to it. Do I need to be a contributer?

Error on flutter web ("Refused to set unsafe header content-length")

Hi,

I was using azblob without a problem, but now, on flutter web, I get the following errors when trying to upload a file :
"Refused to set unsafe header content-length"
followed by :
"Server failed to authenticate the request"

Any idea of the origin / workaround ?
Thanks

Julien

Delete

Thank you very much for creating this package! It's been very helpful to me. I recently found myself needing functionality to delete a file within azure blob storage. I implemented this with the following:

Future<http.StreamedResponse> deleteBlob(String path) async {
    var request = http.Request('DELETE', uri(path: path));
    sign(request);
    return request.send();
  }

Please let me know if you find this helpful and would like to add this, or would like a pull request for it.

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.