AnsweredAssumed Answered

Auhenticate ,call  POST webscript from HTML form

Question asked by aditya_chaudhari on Jan 9, 2015
Latest reply on Jan 14, 2015 by aditya_chaudhari
Hi Forum
I have issue while calling POST webscript from my HTML/ASP pages  :
below are details :

My HTML code :
<javascript>
<table>
     <form action="http://localhost:8080/share/proxy/alfresco/sample/uploadNCDDocs" method="post" enctype="multipart/form-data"          accept-charset="utf-8">
       <tr><td>File:</td><td><input type="file" name="file"></td></tr>
       <tr><td>Title:</td><td><input name="title"></td></tr>
       <tr><td>Description:</td><td><input name="desc"></td></tr>
       <tr><td></td></tr>
       <tr><td><input type="submit" name="submit" value="Upload"></td></tr>
     </form>
   </table>

I have tried Ticket like , i get ticket by following manyually from below REST
ost:8080/alfresco/service/api/login?u=admin&pw=admin

and update my HTML form as ,
<form action="http://10.4.3.91:8080/alfresco/s/sample/uploadNCDDocs?alf_ticket=TICKET_e0b6243dff47d6aba71c7ec790f224b737112bd9" method="post" enctype="multipart/form-data" accept-charset="utf-8">

</javascript>

but it still ask for authentication window.

I refer below jeff pots article
http://ecmarchitect.com/images/articles/alfresco-webscripts/web-script-article.pdf

here jpotts mentioned it may be cross domain scripting issue ,and provide 3 options
1) use script tag
2) use a proxy
3)use a callback mechanism

But i didnt understand how to do it..

Please help me to understand this options and if any other technique to use POST webscript from external HTML form.

Also what is wrogn i am doing while using ticket in URL???

Outcomes