Amazon s3 Javascript- No 'Access-Control-Allow-Origin' header is present on the requested resource

后端 未结 4 828
無奈伤痛
無奈伤痛 2020-12-08 07:18

Am trying to upload my file via:

console.log(\"not broken til here\");
    scope.inputMemeIsFile=true;
    var bucket = new AWS.S3({params: {Bucket: \'townh         


        
4条回答
  •  生来不讨喜
    2020-12-08 07:30

    Some browsers, such as Chrome, do not support localhost or 127.0.0.1 for CORS requests.

    Try using instead: http://lvh.me:5000/

    See https://stackoverflow.com/a/10892392/1464716 for more.

提交回复
热议问题