- Topics: Active | Unanswered
Pages: 1
Topic closed
#1 2010-12-09 06:20:34
- **_simon.hanmer_**
Downloading content zip
According to the web service documentation, to download content you need to construct a url with the format http://server-domain/url-path/output/url-path.zip?download=zip
When I do this and capture the data from the URL, all I'm getting is html rather than the actual file content.
Offline
#2 2010-12-09 07:59:08
- **_Purnima_**
Re: Downloading content zip
You have access to the document? i.e to say you are logged in?
I have tried this multiple times and it has worked fine. I am using Connect 8. Can you share details about your Connect server and kind of document you are trying to access?
If you are using Connect 7.5SP1, you might face some issues as I guess there were some problems with SP1 web APIs
Last edited by **_Purnima_** (2010-12-09 07:59:58)
Offline
#3 2010-12-09 08:06:38
- **_simon.hanmer_**
Re: Downloading content zip
Purnima,
yes I'm logged in - I can navigate through folders etc using sco-expanded-contents and retrieve information around the content, in fact the api works great. It's when I try and use the url form specified in the web service documentation that I have these problem - if I try and download directly using a browser,all works fine.
BTW, I'm on v7.5.2
Edit
Actually I've tried clicking the download link if I'm not logged in and it looks like the files I'm trying to download don't have public access - so I guess the question is how to access via code these files and maintain the authentication I have via the web api
Last edited by **_simon.hanmer_** (2010-12-09 08:14:08)
Offline
#4 2010-12-09 09:15:57
- **_simon.hanmer_**
Re: Downloading content zip
OK, think I've managed to solve this now.
What you need to do is add the session parameter to the url, so instead of
http://server-domain/url-path/output/url-path.zip?download=zip, the url should be
http://server-domain/url-path/output/url-path.zip?download=zip&session=BreezeSessionCookieValue
- obviously substituting the correct value for the session cookie.
Offline
#5 2010-12-10 00:31:13
- **_Purnima_**
Re: Downloading content zip
Ya this is what I meant, that you are logged in (using valid session id).
Thanks for posting the exact solution on Forum
Offline
Pages: 1
Topic closed