Force.com-JavaScript-REST-Toolkit icon indicating copy to clipboard operation
Force.com-JavaScript-REST-Toolkit copied to clipboard

503 error on Community page

Open jonathanwiesel opened this issue 9 years ago • 3 comments

Implementing the file upload functionality I noticed that when the Visualforce page is in a community I get a 503 error:

POST https://community-url.cs17.force.com/services/data/v33.0/sobjects/ContentVersion/ 503 (Service Unavailable)

forcetk.Client.blob @ forcetk:325
forcetk.Client.createBlob @ forcetk:346
upload @ UploadAttachment?pid=003g000000b0uIZAAY:153
onclick @ UploadAttachment?pid=003g000000b0uIZAAY:225

Any workaround or fix?

jonathanwiesel avatar Oct 19 '15 15:10 jonathanwiesel

I have the same problem. Did you find a solution for this?

wimvelzeboer avatar Mar 03 '16 14:03 wimvelzeboer

I have found the solution: You must add the SitePrefix to the url: https://community-url.cs17.force.com/services/data/v33.0/sobjects/ContentVersion/ should be: https://community-url.cs17.force.com/{!$Site.Prefix}/services/data/v33.0/sobjects/ContentVersion/

wimvelzeboer avatar Mar 03 '16 15:03 wimvelzeboer

Hi @wimvelzeboer, I am facing a similar issue. This works fine if I add Remote Site Setting for custom URL but do you know if we can fix this using code by adding site prefix to the login URL?

tanwanimanisha avatar Mar 07 '18 09:03 tanwanimanisha