I'm trying to upload a file to my crx repository in Jquery. However the script runs in a separate server than the which hosts CQ. Because of this the request is a CORS one. Also custom header are being set while the request is being sent because of which a preFlight doOptions is being sent. This sends backs a 403 forbidden and the POST doesn't take place. I tried posing the file using the chrome extension POSTMAN which worked.
The source of SlingPostServlet - http://grepcode.com/file/repo1.maven.org/maven2/org.apache.sling/org.apache.sling.servlets.post/2.3.... and it obviously will not send doesn't send back the custom headers back in it's response. I tried extending the SlingPostServlet and creating a servlet, however on deploying that, the bundle was in installed state.The osgi bundle org.apache.sling.servlets.post doesn't seem to export the package org.apache.sling.servlets.post.impl because of which the bundle is in installed state.
I could always create another servlet and achieve this which is mentioned here - http://helpx.adobe.com/experience-manager/using/uploading-files-aem1.html, but is there any workaround for this so that i can persist data directly to /content/foo/bar... using the restful way
Thanks.