Note that there are some explanatory texts on larger screens.

plurals
  1. POXMLHttpRequest cannot load https://s3.amazonaws.com/. Origin is not allowed by Access-Control-Allow-Origin
    primarykey
    data
    text
    <p>first time i am using AWS and s3 i have to integrate it with salesforce for uploading large files when i try to upload a file it is giving me error</p> <pre><code>OPTIONS https://s3.amazonaws.com/ritesh 403 (Forbidden) resumable.js:344 XMLHttpRequest cannot load https://s3.amazonaws.com/ritesh. Origin https://c.ap1.visual.force.com is not allowed by Access-Control-Allow-Origin. </code></pre> <p>i am using <a href="https://github.com/23/resumable.js" rel="nofollow">resumable.js(a javascript library for sending big files in chunk)</a> as you can see i am sending file from url <a href="https://c.ap1.visual.force.com" rel="nofollow">https://c.ap1.visual.force.com</a> then i tried to send it</p> <p>the code segment from where i am sending file is</p> <pre><code>var r = new Resumable({ target:'https://s3.amazonaws.com/ritesh', chunkSize:1*1024*1024, simultaneousUploads:4, testChunks:false, throttleProgressCallbacks:1, query:{ 'key': 'Hello10' ,'AWSAccessKeyId': '*********' ,'policy':'{!$RemoteAction.S3FormController.getPolicy1}' ,'signature':'{!$RemoteAction.S3FormController.getSignedPolicy1}', 'acl': '{!AWS_S3_Object__c.Access__c}','success_action_status':'201' , 'success_action_redirect':'https://'+'{!$RemoteAction.S3FormController.getServerURL1}'+'/'+'{!AWS_S3_Object__c.id}' ,'Content-Type' :'application/zip' } }); </code></pre> <p>because i am using an existing JS library thats why its looking little weired.this code means i am sending a post request to <a href="https://s3.amazonaws.com/ritesh" rel="nofollow">https://s3.amazonaws.com/ritesh</a> ritesh is my bucket name setting other post parameters like key ,AWSAccessKeyId,policy,signature,acl,success_action_status etc all parameters are praobably correct why i am getting this error.my Cors Configuration is</p> <pre><code>&lt;CORSConfiguration&gt; &lt;CORSRule&gt; &lt;AllowedOrigin&gt;https://c.ap1.visual.force.com/&lt;/AllowedOrigin&gt; &lt;AllowedMethod&gt;PUT&lt;/AllowedMethod&gt; &lt;AllowedMethod&gt;POST&lt;/AllowedMethod&gt; &lt;AllowedMethod&gt;DELETE&lt;/AllowedMethod&gt; &lt;AllowedHeader&gt;*&lt;/AllowedHeader&gt; &lt;/CORSRule&gt; &lt;CORSRule&gt; &lt;AllowedOrigin&gt;*&lt;/AllowedOrigin&gt; &lt;AllowedMethod&gt;GET&lt;/AllowedMethod&gt; &lt;/CORSRule&gt; &lt;/CORSConfiguration&gt; </code></pre> <p>i am sending only parameters not any header should i have to send additional headers which headers please menton!!please please help how to remove this error</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload