edit-icon download-icon


Last Updated: Feb 22, 2018

Back to Overview

As JavaScript files and video files are stored in different regions, a cross-region request is initiated when a JavaScript file is uploaded. In this case, cross-region settings must be implemented on OSS. Otherwise, files cannot be uploaded using JavaScript at the web end.

  1. Open the CORS settings page of the input bucket.


  2. Add a rule.


    • Source

      Enter the name of the region in which JavaScript files are deployed. If access through both HTTP and HTTPS is required, add them respectively.

    • Method

      Select GET, POST, PUT, and HEAD.

    • Allowed Header

      Enter *.

    • Expose Header

      Enter etag and x-oss-request-id in two lines.

Next step: Request security token - Java sample code

Thank you! We've received your feedback.