<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                合規國際互聯網加速 OSASE為企業客戶提供高速穩定SD-WAN國際加速解決方案。 廣告
                [TOC] [文檔](https://help.aliyun.com/zh/oss/developer-reference/?spm=a2c4g.11186623.0.0.78a725f5fh6Ojs) ? [登錄地址](https://account.aliyun.com/login/login.htm?oauth_callback=https://oss.console.aliyun.com/index) ## 1、可選[創建資源組](https://resourcemanager.console.aliyun.com/resource-groups) ![](https://img.kancloud.cn/90/48/90484a20949bf2bd63db492dd64a5506_1332x627.png) ![](https://img.kancloud.cn/b7/74/b774ed320695699b2fb5a0063b745092_1307x568.png) ## 2、[創建Bucket](https://oss.console.aliyun.com/bucket) ![](https://img.kancloud.cn/47/46/47466ef88bb025caefc04ff87195132e_1348x654.png) ? ### **讀寫權限:** (1)私有:對object的所有訪問操作需要進行身份驗證。就是普通用戶或其他用戶沒有經過認證,它是訪問不了的。 ? (2)公共讀:對object寫操作()需要進行身份驗證:可以對object進行匿名讀。就是其他人可以沒有經過認證就去讀,訪問bucket資源,沒有寫的權限。 ? (3)公共讀寫:所有人都可以對object進行讀寫操作。 ? 選擇私有權限,點擊提交,在列表里就可以看見創建完的bucket。 ? 新建bucketName(需要全局唯一)。 ? ? ### **存儲冗余類型 [說明](https://aliyun.cloudduo.cn/oss_zrs_lrs.html)** * 同城冗余ZRS(0.15元/GB/月):將您的數據冗余存儲在同**一個區域的多個可用區**,可支持單個可用區(機房)整體故障時(如斷電、火災等),仍維持數據不丟失,可正常訪問。 * 本地冗余LRS(0.12元/GB/月):將您的數據冗余存儲在同**一個可用區的不同存儲設備上**,可支持兩個存儲設備并發損壞時,仍維持數據不丟失,可正常訪問。 ? ### **讀寫權限** public-read-write,public-read和private ? 常見問題小結 (1)bucket設置為私有,能否防止惡意下載 不能防止,一但對應資源的簽名url對外暴露,在簽名url有效期內就可以通過簽名url下載對應的資源。 ? (2)bucket私有,獲取到的資源鏈接是否具有時效性 有時效性,一但過期就不可被訪問。 ? (3)獲取到的資源鏈接是否可以永久有效 將bucket改為公共讀/公共讀寫,獲取到的object鏈接一般都是永久有效的,但是如果bucket私有則一般獲取的鏈接是有時效的。 ? ## **控制臺上傳** 1、新建文件夾(區分大小寫) ![](https://img.kancloud.cn/59/4a/594aa1d9f4ece462ccea503c81a55d33_693x185.png) 2、找test目錄點擊上傳文件比如我么上傳選擇B文件夾那么他會將B文件和里面的子文件等都上傳上去(一次最多10000文件并且最大不來了個超過5G) ## **準備** 1、創建用戶: 身份管理-創建用戶:此步驟需要手機驗證 ![](https://img.kancloud.cn/35/46/35465564b3437dac1390455c7aa1d6cf_1162x408.png) 保存好AccessKeyID和AccessKey secret (secret_key,這個只顯示一次,后續不會在出現) ![](https://img.kancloud.cn/4c/1f/4c1f37b34dd968fc0c5c134b34a71f6d_1177x302.png) 授予該用戶 AliyunOSSFullAccess系統策略管理對象存儲服務(OSS)權限 ![](https://img.kancloud.cn/46/27/4627a6fcdc9ef9947a136d1f3f280e1e_1311x507.png) 2、拿到該用戶的信息 * AccessKeyID * AccessKey secret * endpoint:oss-cn-beijing.aliyuncs.com [訪問域名和數據中心](https://help.aliyun.com/zh/oss/user-guide/regions-and-endpoints#concept-zt4-cvy-5db)獲取(注意前面加上http://或者htps://,想要那個協議加上對應的) ![](https://img.kancloud.cn/d7/5d/d75d6f2c0a3c39e915dc6bc5a39eb467_903x104.png) ? ? 根據提示分別設置Endpoint、AccessKey ID、AccessKey Secret和STSToken參數。 | **參數**| **說明**| | --- | --- | | endpoint| 填寫Bucket所在地域的Endpoint。關于各地域Endpoint的更多信息,請參見[訪問域名和數據中心](https://help.aliyun.com/zh/oss/user-guide/regions-and-endpoints#concept-zt4-cvy-5db)。<br>您也可以增加`http://`或`https://`指定ossutil訪問OSS使用的協議,默認使用HTTP協議。例如,使用HTTPS協議訪問華東1(杭州)的Bucket,設置為`https://oss-cn-hangzhou.aliyuncs.com`。| | accessKeyID| 填寫賬號的AccessKey。<br>* 使用阿里云賬號或RAM用戶訪問時,AccessKey的獲取方式,請參見[創建AccessKey](https://help.aliyun.com/document_detail/53045.html#task968)。<br>* 使用STS臨時授權賬號訪問時,AccessKey的獲取方式,請參見[使用STS臨時訪問憑證訪問OSS](https://help.aliyun.com/zh/oss/developer-reference/use-temporary-access-credentials-provided-by-sts-to-access-oss#concept-xzh-nzk-2gb)。| | accessKeySecret| | stsToken|使用STS臨時授權賬號訪問OSS時需要配置該項,否則置空即可。關于stsToken的生成方式,請參見[臨時訪問憑證](https://help.aliyun.com/zh/oss/user-guide/authorized-third-party-upload#section-dvv-hkb-5db)。 | **說明** 關于配置文件的更多信息,請參見[config](https://help.aliyun.com/zh/oss/developer-reference/config#concept-303826)。 ? ? ? ? ? [對象存儲OSS](https://help.aliyun.com/zh/oss/developer-reference/common-tools/?spm=a2c4g.11186623.0.0.61c528c43Xxa5Z)>[開發參考](https://help.aliyun.com/zh/oss/developer-reference/?spm=a2c4g.11186623.0.0.710e94e0a4iI01)>[常用工具](https://help.aliyun.com/zh/oss/developer-reference/common-tools/?spm=a2c4g.11186623.0.0.57bd2435fkRmBl)>[# 命令行工具ossutil](https://help.aliyun.com/zh/oss/developer-reference/ossutil-1/?spm=a2c4g.11186623.0.0.29d32ef5LcfHd3) ? ? ? ? ## **下載**[**ossutil**](https:help.aliyun.com/zh/oss/developer-reference/install-ossutil?spm=a2c4g.207217.0.i0#concept-303829)**Tools** 運行ossutil.bat Extract the tool and double-click to run the ossutil.bat file ### **配置** ![](https://img.kancloud.cn/d1/55/d1558acee8441fa044df3e0ddfd019df_841x304.png) ![](https://img.kancloud.cn/0a/21/0a21235ff27d171a6b53b033ff5b2401_404x150.png) ### **驗證是否已成功安裝ossutil。** Enter ossutil to verify success, a black window displays many commands and explains success ``` Commands: mb cloud_url [options] Create a bucket ls [cloud_url] [options] List buckets or objects rm cloud_url [options] Delete buckets or objects stat cloud_url [options] Displays the description of the bucket or object set-acl cloud_url [acl] [options] Set ACLs for buckets or objects set-meta cloud_url [meta] [options] Set the meta information of the uploaded objects cp src_url dest_url [options] Upload, download or copy Objects restore cloud_url [local_xml_file] [options] Objects restored to a frozen state are readable create-symlink cloud_url target_url [options] Create a symbolic link read-symlink cloud_url [options] Read the description of the symbolic link file sign cloud_url [meta] [options] Generate an object download link probe file_name [options] Probe command, support a variety of function detection mkdir dir_name [options] Create a directory whose name has the suffix '/' in OSS cors bucket_url [local_xml_file] [options] Configure, query, or delete the CORS configuration of a bucket logging src_bucket_url target_bucket_url [options] Configure, query, or delete the log configuration of a bucket referer bucket_url referer [options] Set, query, or delete the referer configuration of a bucket listpart oss_object uploadid [options] Lists the chunk information of objects that have not completed the chunked upload getallpartsize bucket_url [options] Obtain the chunk size and sum of all incomplete multipart objects uploaded to the bucket appendfromfile local_file_name oss_object [options] Upload the local file content to the Appendable Object in OSS by append cat object [options] Outputs the contents of the file to standard output bucket-tagging bucket_url [tag_parameter] [options] Configure, query, or delete the tag configuration of a bucket bucket-encryption bucket_url [options] Set, query, or delete the encryption configuration of a bucket cors-options oss_url [options] Send HTTP options requests to OSS for CORS detection style bucket_url [local_xml_file] [style_name] [options] Add, query, delete, or list image styles for buckets lifecycle bucket_url local_xml_file [options] Configure, query, or delete the lifecycle configuration of a bucket website bucket_url local_xml_file [options] Configure, query, or delete the website configuration of a bucket bucket-qos bucket_url [local_xml_file] [options] Configure, query, or delete the QoS configuration of a bucket user-qos [local_file] [options] Query the QoS configuration of the user bucket-versioning bucket_url [versioning_parameter] [options] Set and query the versioning configuration of the bucket du bucket_url [options] Obtain the amount of bucket or the amount of storage occupied by a specified prefix (directory). bucket-policy bucket_url [local_json_file] [options] Configure, query, or delete the bucket's policy configuration request-payment bucket_url [payment_parameter] [options] Configure and query the visitor payment configuration of the bucket object-tagging cloud_url [tag_parameter] [options] Set, query, or delete the tag configuration of an object inventory bucket_url [local_xml_file] [id] [options] Add, query, delete, or list bucket configurations revert-versioning cloud_url [options] Reverts an object from a deleted state to a recent multi-version state sync src dest [options] Synchronize local file directories or OSS Prefix from the source to the destination worm command_name bucket_url [days] [wormId] [options] Configure, delete, modify, and commit the Worm configuration of a bucket lrb [conf_file] [options] List buckets in a region replication bucket_url [local_xml_file|ruleID] [options] Cross-region synchronization configuration management of buckets bucket-cname bucket_url [options] Manage bucket cname and cname token configuration lcb [options] List cloud box information access-monitor bucket_url local_xml_file [options] Set and query the access monitor configuration of the bucket resource-group bucket_url local_xml_file [options] Set and query the resource group configuration of the bucket Additional Commands: help [command] Gets help documentation for the command config [options] Create a configuration file to store configuration items hash file_url [options] Calculate the CRC64 or MD5 of the local file update [options] 更新ossutil ``` ### **操作** ### **上傳**[(文檔鏈接)](https://help.aliyun.com/zh/oss/developer-reference/upload-objects-6?spm=a2c4g.11186623.0.0.55e143a3peLdxV) 示例說明如下: * 本地文件:examplefile.txt(根目錄下的文件) * 本地文件夾:localfolder(根目錄下的文件夾) * 目標Bucket:examplebucket * 目標Bucket指定目錄:desfolder ossutil支持將本地文件上傳到OSS,示例如下: * 上傳單個文件 上傳文件時,如果不指定上傳至OSS的文件名,則默認使用原文件名進行保存;如果指定文件名,則按照指定的文件名保存在OSS中。 ~~~bash ./ossutil64 cp examplefile.txt oss://examplebucket/desfolder/ ~~~ * 僅上傳文件夾內的文件 使用cp命令時增加\-r選項,可以只將本地文件夾內的文件上傳到OSS指定路徑。 ~~~bash ./ossutil64 cp -r localfolder/ oss://examplebucket/desfolder/ ~~~ >[danger]window同理,ossutil64和ossutil.bat在同一文件夾下,我們打開ossutil.bat則無需在指定絕對路徑而是直接`ossutil64 cp -r localfolder/ oss://examplebucket/desfolder/`否則需要指定完整的執行文件路徑`E:\ossutil-v1.7.17-windows-amd64.exe cp -r localfolder/ oss://examplebucket/desfolder/` * 上傳文件夾及文件夾內的文件 使用cp命令時增加\-r選項,并在OSS指定路徑下添加本地文件夾名稱,可以將本地文件夾以及文件夾內的文件上傳到OSS指定路徑。 ~~~bash ./ossutil64 cp -r localfolder/ oss://examplebucket/desfolder/localfolder/ ~~~ >[danger]windows系統將J:\BaiduNetdiskDownload\Media\Oimages\hello\ 文件夾下的內容上傳到名字叫ava的Bucket下的test/目錄下 ``` ossutil64 cp -r J:\BaiduNetdiskDownload\Media\Oimages\hello\ oss://ava/test/hello/ ``` J:\BaiduNetdiskDownload\Media\Oimages\K\ 文件夾下的內容上傳到名字叫ava的Bucket的根目錄下 ``` ossutil64 cp -r J:\BaiduNetdiskDownload\Media\Oimages\K\ oss://aviva/K/ ``` * 上傳單個文件并指定\--meta選項 上傳文件的同時可以使用\--meta選項設置文件的meta信息,其內容格式為`header:value#header:value...`。 ~~~bash ./ossutil64 cp examplefile.txt oss://examplebucket/desfolder/examplefile.txt --meta=Cache-Control:no-cache#Content-Encoding:gzip ~~~ * 上傳文件夾并跳過已有文件 批量上傳失敗重傳時,可以指定\--update(可縮寫為\-u)選項跳過已經上傳成功的文件,實現增量上傳。示例如下: ~~~bash ./ossutil64 cp -r localfolder/ oss://examplebucket/desfolder/ -u ~~~ * 上傳文件到開通了請求者付費模式的Bucket ~~~bash ./ossutil64 cp localfolder/examplefile.txt oss://examplebucket/ --payer=requester ~~~ * 僅上傳當前目錄下的文件,忽略子目錄 ~~~bash ./ossutil64 cp localfolder/ oss://examplebucket/desfolder/ --only-current-dir -r ~~~ * 上傳時不為目錄生成Object OSS的目錄是用一個0 KB大小,名稱以正斜線(/)結尾的Object模擬的。上傳時增加\--disable-dir-object參數,ossutil不會為該目錄生成Object,但您仍可以在OSS控制臺看到對應的目錄結構。當您刪除目錄內的文件時,該目錄也會消失。 ~~~bash ./ossutil64 cp localfolder/ oss://examplebucket/desfolder/ --disable-dir-object -r ~~~ * 上傳軟鏈接子目錄下的文件 ~~~bash ./ossutil64 cp localfolder/ oss://examplebucket/desfolder/ --enable-symlink-dir -r ~~~ * 上傳時忽略所有的軟鏈接子文件以及軟鏈接子目錄 ~~~bash ./ossutil64 cp localfolder/ oss://examplebucket/desfolder/ -r --disable-all-symlink ~~~
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看