如何从JavaScript中的onload函数返回字符串

时间:2017-03-27 15:30:28

标签: javascript twitter codebird

我有这个功能将通过输入上传的图像转换为base64字符串。如何返回它,以便稍后调用此函数时(见下文),我将返回base64字符串?

Read

这是我调用函数的地方:

        var sasToken = blob.GetSharedAccessSignature(new SharedAccessBlobPolicy()
        {
            Permissions = SharedAccessBlobPermissions.Read,
            SharedAccessExpiryTime = DateTime.UtcNow.AddHours(1),

        }, new SharedAccessBlobHeaders()
        {
            ContentDisposition = "attachment;filename=" + blob.Name
        });
        var blobUrl = string.Format("{0}{1}", blob.Uri.AbsoluteUri, sasToken);
        return Redirect(blobUrl);

0 个答案:

没有答案