[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"app-docs-nav-lffile":3,"app-docs-lffile@25":17,"mdc-syayw2-key":21},{"code":4,"message":5,"data":6},200,"success",{"appname":7,"title":8,"navigation":9},"lffile","阿里云、腾讯云、七牛云前端直传插件",[10],{"title":11,"icon":12,"children":13},"使用文档","i-lucide-rocket",[14],{"title":15,"path":16},"直传配置","/docs/lffile@25",{"code":4,"message":5,"data":18},{"title":15,"description":19,"body":20},null,"安装插件后把插件目录的两个上传的文件\n![](https://image.saithink.top/storage/20260123/c81603e038c45a23233e5dc9cc9b203c3d0fa635.png)\n替换原本components下面的组件的index，建议把官方的index改名成index1即可\n![](https://image.saithink.top/storage/20260123/58b157184200470837a6f824dfd35d3206fc5569.png)\n根据使用哪个直传则取消注释即可\n![](https://image.saithink.top/storage/20260123/9f90e1d2a70e6491ad9577fa5241370793b99d07.png)\n\n\n# **1、腾讯云配置**\n\n安装插件后安装服务器依赖\n\n```language\ncomposer require qcloud_sts/qcloud-sts-sdk\n```\n\n安装前端依赖\n\n\n```language\nnpm i cos-js-sdk-v5\n```\n\n# **2、七牛云配置**\n\n服务端依赖\n```language\ncomposer require qiniu/php-sdk\n```\n\n安装前端依赖\n\n\n```language\nnpm i qiniu-js\n```\n# \n# **3、阿里云配置（注意注意）**\n阿里云直传不能使用默认的AK配置需要创建子账户发起直传功能\n\n1、第一步进入访问控制\n![](https://image.saithink.top/storage/20260123/ddee0bbaca1d054607a586a7092599364cd23de5.png)\n2、第二步创建一个子账户、同时授权操作权限\n\n![](https://image.saithink.top/storage/20260123/30ad1d7b42ce67b37e222cd97a7b06d338aaa313.png)\n![](https://image.saithink.top/storage/20260123/da491b219162ca55e673b0fbe621c983f4445365.png)\n\n3、第三步，新增一个角色然后点击角色名称进入详情里面拿ARN的配置\n\n![](https://image.saithink.top/storage/20260123/ec62cf7d06064d88e7b8a13ce24259d7d934a8b8.png)\n![](https://image.saithink.top/storage/20260123/d3ee14c361b0e3d4e2b4cea1b4220b28aca1edce.png)\n\n4、第四步，后上传配置里面额外添加oss_region存储桶位置和oss_role_arn字段把刚刚的arn配置填写进去，阿里endpoint的这个配置默认填写sts.cnhangzhou.aliyuncs.com即可，然后阿里云存储\u003Cu>accessKeySecret和阿里云存储accessKeyId都需要填写子账户生成的不能用主账户的\u003C/u>\n\n![](https://image.saithink.top/storage/20260123/f7662244eb05050df796f8e280487bc0ac1ad09e.png)\n然后剩余的配置照旧即可。\n\n服务端依赖\n```language\ncomposer require alibabacloud/sts-20150401\n```\n\n安装前端依赖\n\n\n```language\nnpm i ali-oss\n```\n",{"data":22,"body":23},{},{"type":24,"children":25},"root",[26,52,63,68,81,86,94,103,108,116,120,128,131,140,145,156,167,172,183,194,203,207,215,219,227],{"type":27,"tag":28,"props":29,"children":30},"element","p",{},[31,34,40,42,46,48],{"type":32,"value":33},"text","安装插件后把插件目录的两个上传的文件\n",{"type":27,"tag":35,"props":36,"children":39},"img",{"alt":37,"src":38},"","https://image.saithink.top/storage/20260123/c81603e038c45a23233e5dc9cc9b203c3d0fa635.png",[],{"type":32,"value":41},"\n替换原本components下面的组件的index，建议把官方的index改名成index1即可\n",{"type":27,"tag":35,"props":43,"children":45},{"alt":37,"src":44},"https://image.saithink.top/storage/20260123/58b157184200470837a6f824dfd35d3206fc5569.png",[],{"type":32,"value":47},"\n根据使用哪个直传则取消注释即可\n",{"type":27,"tag":35,"props":49,"children":51},{"alt":37,"src":50},"https://image.saithink.top/storage/20260123/9f90e1d2a70e6491ad9577fa5241370793b99d07.png",[],{"type":27,"tag":53,"props":54,"children":56},"h1",{"id":55},"_1腾讯云配置",[57],{"type":27,"tag":58,"props":59,"children":60},"strong",{},[61],{"type":32,"value":62},"1、腾讯云配置",{"type":27,"tag":28,"props":64,"children":65},{},[66],{"type":32,"value":67},"安装插件后安装服务器依赖",{"type":27,"tag":69,"props":70,"children":75},"pre",{"className":71,"code":72,"language":73,"meta":37,"style":74},"language-language","composer require qcloud_sts/qcloud-sts-sdk\n","language","undefined",[76],{"type":27,"tag":77,"props":78,"children":79},"code",{"__ignoreMap":37},[80],{"type":32,"value":72},{"type":27,"tag":28,"props":82,"children":83},{},[84],{"type":32,"value":85},"安装前端依赖",{"type":27,"tag":69,"props":87,"children":89},{"className":71,"code":88,"language":73,"meta":37,"style":74},"npm i cos-js-sdk-v5\n",[90],{"type":27,"tag":77,"props":91,"children":92},{"__ignoreMap":37},[93],{"type":32,"value":88},{"type":27,"tag":53,"props":95,"children":97},{"id":96},"_2七牛云配置",[98],{"type":27,"tag":58,"props":99,"children":100},{},[101],{"type":32,"value":102},"2、七牛云配置",{"type":27,"tag":28,"props":104,"children":105},{},[106],{"type":32,"value":107},"服务端依赖",{"type":27,"tag":69,"props":109,"children":111},{"className":71,"code":110,"language":73,"meta":37,"style":74},"composer require qiniu/php-sdk\n",[112],{"type":27,"tag":77,"props":113,"children":114},{"__ignoreMap":37},[115],{"type":32,"value":110},{"type":27,"tag":28,"props":117,"children":118},{},[119],{"type":32,"value":85},{"type":27,"tag":69,"props":121,"children":123},{"className":71,"code":122,"language":73,"meta":37,"style":74},"npm i qiniu-js\n",[124],{"type":27,"tag":77,"props":125,"children":126},{"__ignoreMap":37},[127],{"type":32,"value":122},{"type":27,"tag":53,"props":129,"children":130},{"id":37},[],{"type":27,"tag":53,"props":132,"children":134},{"id":133},"_3阿里云配置注意注意",[135],{"type":27,"tag":58,"props":136,"children":137},{},[138],{"type":32,"value":139},"3、阿里云配置（注意注意）",{"type":27,"tag":28,"props":141,"children":142},{},[143],{"type":32,"value":144},"阿里云直传不能使用默认的AK配置需要创建子账户发起直传功能",{"type":27,"tag":28,"props":146,"children":147},{},[148,150,154],{"type":32,"value":149},"1、第一步进入访问控制\n",{"type":27,"tag":35,"props":151,"children":153},{"alt":37,"src":152},"https://image.saithink.top/storage/20260123/ddee0bbaca1d054607a586a7092599364cd23de5.png",[],{"type":32,"value":155},"\n2、第二步创建一个子账户、同时授权操作权限",{"type":27,"tag":28,"props":157,"children":158},{},[159,163],{"type":27,"tag":35,"props":160,"children":162},{"alt":37,"src":161},"https://image.saithink.top/storage/20260123/30ad1d7b42ce67b37e222cd97a7b06d338aaa313.png",[],{"type":27,"tag":35,"props":164,"children":166},{"alt":37,"src":165},"https://image.saithink.top/storage/20260123/da491b219162ca55e673b0fbe621c983f4445365.png",[],{"type":27,"tag":28,"props":168,"children":169},{},[170],{"type":32,"value":171},"3、第三步，新增一个角色然后点击角色名称进入详情里面拿ARN的配置",{"type":27,"tag":28,"props":173,"children":174},{},[175,179],{"type":27,"tag":35,"props":176,"children":178},{"alt":37,"src":177},"https://image.saithink.top/storage/20260123/ec62cf7d06064d88e7b8a13ce24259d7d934a8b8.png",[],{"type":27,"tag":35,"props":180,"children":182},{"alt":37,"src":181},"https://image.saithink.top/storage/20260123/d3ee14c361b0e3d4e2b4cea1b4220b28aca1edce.png",[],{"type":27,"tag":28,"props":184,"children":185},{},[186,188],{"type":32,"value":187},"4、第四步，后上传配置里面额外添加oss_region存储桶位置和oss_role_arn字段把刚刚的arn配置填写进去，阿里endpoint的这个配置默认填写sts.cnhangzhou.aliyuncs.com即可，然后阿里云存储",{"type":27,"tag":189,"props":190,"children":191},"u",{},[192],{"type":32,"value":193},"accessKeySecret和阿里云存储accessKeyId都需要填写子账户生成的不能用主账户的",{"type":27,"tag":28,"props":195,"children":196},{},[197,201],{"type":27,"tag":35,"props":198,"children":200},{"alt":37,"src":199},"https://image.saithink.top/storage/20260123/f7662244eb05050df796f8e280487bc0ac1ad09e.png",[],{"type":32,"value":202},"\n然后剩余的配置照旧即可。",{"type":27,"tag":28,"props":204,"children":205},{},[206],{"type":32,"value":107},{"type":27,"tag":69,"props":208,"children":210},{"className":71,"code":209,"language":73,"meta":37,"style":74},"composer require alibabacloud/sts-20150401\n",[211],{"type":27,"tag":77,"props":212,"children":213},{"__ignoreMap":37},[214],{"type":32,"value":209},{"type":27,"tag":28,"props":216,"children":217},{},[218],{"type":32,"value":85},{"type":27,"tag":69,"props":220,"children":222},{"className":71,"code":221,"language":73,"meta":37,"style":74},"npm i ali-oss\n",[223],{"type":27,"tag":77,"props":224,"children":225},{"__ignoreMap":37},[226],{"type":32,"value":221},{"type":27,"tag":228,"props":229,"children":230},"style",{},[231],{"type":32,"value":37}]