Azure的BLOB /文件名的上传时名称 [英] Name of Azure blob/filename when uploading

查看:277
本文介绍了Azure的BLOB /文件名的上传时名称的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我上传到蔚蓝的容器保存的文件名是UUID(GUID)我怎样才能改变这种状况?

我通过查询字符串bloburi的签名请求添加创建签字。

  $(#细上传)。fineUploaderAzure({
        autoUpload:真实,
        调试:真实,
        验证:{
            itemLimit:10,
            的sizeLimit:209715200 // 200 MB
        },
        简历: {
            启用:真实,
            ID:'ResumeUpload',
            cookiesExpireIn:7
        },
        extraButtons:{
            文件夹:真
        },
        删除文件: {
            启用:真
        },
        要求:{
            端点:'https://xxx.blob.core.windows.net/
        },
        CORS:{
            //所有的请求都有望成为跨域请求
            预计:真实,            //如果你想饼干与请求一起发送
            sendCredentials:真
        },
        签名:{
            端点:'/信号/'
        },
       uploadSuccess:{
           端点:'/成功
       }    });


解决方案

该文档是错误的。
对于4.4.0版本的正确属性设置为: blobProperties

  //UUID,文件名,或一个函数,它可能是约定
blobProperties:{
    名称:的「uuid」
},

When I upload to azure container the filename that is saved is the uuid(guid) how can I change that?

I create the signatur by using the querystring "bloburi" added in the signature request.

 $("#fine-uploader").fineUploaderAzure({
        autoUpload : true,
        debug: true,
        validation: {
            itemLimit: 10,
            sizeLimit: 209715200 // 200 mb
        },
        resume: {
            enabled: true,
            id: 'ResumeUpload',
            cookiesExpireIn: 7
        },
        extraButtons: {
            folders: true
        },
        deleteFile: {
            enabled: true
        },
        request: {                
            endpoint: 'https://xxx.blob.core.windows.net/'
        },
        cors: {
            //all requests are expected to be cross-domain requests
            expected: true,

            //if you want cookies to be sent along with the request
            sendCredentials: true
        },
        signature: {
            endpoint: '/sig/'
        },
       uploadSuccess: {
           endpoint: '/success'
       }

    });

解决方案

The docs are wrong. For version 4.4.0 the correct property to set is:blobProperties

// 'uuid', 'filename', or a function which may be promissory
blobProperties: {
    name: "uuid"
},

这篇关于Azure的BLOB /文件名的上传时名称的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆