Upload video to Azure blob storage with pre generated SAS token

تعرفه تبلیغات در سایت
عنوان عکس
عنوان عکس
عنوان عکس
عنوان عکس
عنوان عکس

آرشیو مطالب

جستجوگر

یافته ها در جستجو

    امکانات وب

    برچسب ها

    Vote count: 0

    I have the SAS token which is coming from the API, how can i use it to upload video to azure blob storage.

    var blobUri = 'https://.blob.core.windows.net/';
    var blobService = AzureStorage.createBlobServiceWithSas(blobUri,   vm.sasToken, '');
    var customBlockSize = vm.file.size > 1024 * 1024 * 32 ? 1024 * 1024 * 4 : 1024 * 512;
    blobService.singleBlobPutThresholdInBytes = customBlockSize;
    var finishedOrError = false;
    vm.inProgress = true;
    speedSummary = blobService.createBlockBlobFromBrowserFile('demo', vm.file.name, vm.file, { blockSize: customBlockSize }, function (error, result, response) {
    finishedOrError = true;
    if (error) {
      console.log(error);
    } else {
      console.log('success');
    }
    });
    refreshProgress();
    

    I am getting this error in console.

    (Server failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature.)

    asked 41 secs ago
    Ahmer Khan

    نویسنده : استخدام کار بازدید : 0 تاريخ : جمعه 21 مهر 1396 ساعت: 16:36
    برچسب‌ها :