REST Cross domain call to upload file
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-15-2014 10:03 AM
I am using REST api to upload file. http://fiddle.jshell.net/876fzzd5/5/ is the pastebin.
I am using http://malsup.com/jquery/form/#file-upload form plugin to upload cross domain.
IE debug tools show that correct response received from the server. However success call back is always called. If I dont use cross domain ajax call then the correct call back methods are called.
Could some one let me know what might be the issue ?
I am using http://malsup.com/jquery/form/#file-upload form plugin to upload cross domain.
IE debug tools show that correct response received from the server. However success call back is always called. If I dont use cross domain ajax call then the correct call back methods are called.
Could some one let me know what might be the issue ?
Labels:
- Labels:
-
Archive
2 REPLIES 2

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-15-2014 01:52 PM
Hey ayub,
i 'm quite new to alfresco, so just some things i noticed:
* For me that sounds like a jquery issue
* action="…./alfresco/wcservice/api/upload.post.html" …. never heard about this service. I would use: http://docs.alfresco.com/community/references/RESTful-UploadUploadPost.html
* May u use Firebug / Chrome Dev Tools to see which requests/respones are sent and which HTTP response codes you get (200, 404, 500….) and compare cross-request vs. no-cross-request.
* May u use Postman (Chrome App) to build request by hand before and see if everything works
Greetings
Chris
i 'm quite new to alfresco, so just some things i noticed:
* For me that sounds like a jquery issue
* action="…./alfresco/wcservice/api/upload.post.html" …. never heard about this service. I would use: http://docs.alfresco.com/community/references/RESTful-UploadUploadPost.html
* May u use Firebug / Chrome Dev Tools to see which requests/respones are sent and which HTTP response codes you get (200, 404, 500….) and compare cross-request vs. no-cross-request.
* May u use Postman (Chrome App) to build request by hand before and see if everything works
Greetings
Chris
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-16-2014 12:54 AM
Hi Christian,
I initially tried the /alfresco/service/api/upload url for file upload however in IE9 the response was being downloaded as a file. So I changed the url. I had to use /alfresco/wcservice as I am using SSO.
Thanks and Regards
Ayub
I initially tried the /alfresco/service/api/upload url for file upload however in IE9 the response was being downloaded as a file. So I changed the url. I had to use /alfresco/wcservice as I am using SSO.
Thanks and Regards
Ayub
