Force.com-JavaScript-REST-Toolkit
Force.com-JavaScript-REST-Toolkit copied to clipboard
503 error on Community page
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?
I have the same problem. Did you find a solution for this?
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/
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?