Upload BlockBlob to Azure Storage using React

前端 未结 2 1011

I haven\'t been able to get a working example. My following example tells me that the createBlockBlob method is undefined.

Note: I\'ve also tried createBlockBlobFromLoca

2条回答
  •  囚心锁ツ
    2021-01-22 00:00

    Here are some differences between storage JS v2 and V10 SDK regarding browser scenarios support:

    1. V10 support browser scenarios with npm package and classic single JS bundle file; V2 only supports browser usage with classic single JS bundle file like Peter Pan's sample.

    2. V10 doesn't support SharedKeyCredential in browsers, while V2 supports.

    So, if you are building a React Web APP and importing storage SDK using npm dependency. Please use V10. Also please don't use account name and key in browsers, because it's not safe.

提交回复
热议问题