I saw there was an earlier post on this topic but I was unable to
solve my problem despite having read it.
I am able to obtain fileData URLs but I can only retrieve certain file
types. Image files seem to work but .txt
and .pdf for example do not. Instead I get a 406 error.
The previous post mentioned that I need to set the appropriate Accept
header but I'm not sure
what the correct setting should be, especially when retrieval works
for some files and not others.
I checked the headers for both files I am unable and able to retrieve,
here are respective examples:
{null=[HTTP/1.1 406 Not Acceptable], Date=[Mon, 06 Feb 2012 13:28:44
GMT], Content-Length=[287], Content-Type=[text/html;
charset=ISO-8859-1], Accept-Ranges=[bytes], Server=[Noelios-Restlet-
Engine/1.1.5]}
>I saw there was an earlier post on this topic but I was unable to >solve my problem despite having read it. >I am able to obtain fileData URLs but I can only retrieve certain file >types. Image files seem to work but .txt >and .pdf for example do not. Instead I get a 406 error.
>The previous post mentioned that I need to set the appropriate Accept >header but I'm not sure >what the correct setting should be, especially when retrieval works >for some files and not others.
>I checked the headers for both files I am unable and able to retrieve, >here are respective examples:
>{null=[HTTP/1.1 406 Not Acceptable], Date=[Mon, 06 Feb 2012 13:28:44 >GMT], Content-Length=[287], Content-Type=[text/html; >charset=ISO-8859-1], Accept-Ranges=[bytes], Server=[Noelios-Restlet- >Engine/1.1.5]}
I'm now using "*/*" simply to make sure it's working but I
occasionally get 500 error messages while looping through my files
although there's no problem when retrieving individual ones.
I'd rather set the accept header to something less reliant on
wildcards though, can I simply use the returned content-type as the
accept header on a file-per-file basis?
On Feb 7, 10:29 am, Jim Wong <jw...@sugarsync.com> wrote:
> What value are you providing in the Accept header?
> --
> Jim Wong (jw...@sugarsync.com)
> On 2/6/12 5:32 AM, "Seb" <sebnmul...@gmail.com> wrote:
> >Hi!
> >I saw there was an earlier post on this topic but I was unable to
> >solve my problem despite having read it.
> >I am able to obtain fileData URLs but I can only retrieve certain file
> >types. Image files seem to work but .txt
> >and .pdf for example do not. Instead I get a 406 error.
> >The previous post mentioned that I need to set the appropriate Accept
> >header but I'm not sure
> >what the correct setting should be, especially when retrieval works
> >for some files and not others.
> >I checked the headers for both files I am unable and able to retrieve,
> >here are respective examples:
> >{null=[HTTP/1.1 406 Not Acceptable], Date=[Mon, 06 Feb 2012 13:28:44
> >GMT], Content-Length=[287], Content-Type=[text/html;
> >charset=ISO-8859-1], Accept-Ranges=[bytes], Server=[Noelios-Restlet-
> >Engine/1.1.5]}
>I'm now using "*/*" simply to make sure it's working but I >occasionally get 500 error messages while looping through my files >although there's no problem when retrieving individual ones.
>I'd rather set the accept header to something less reliant on >wildcards though, can I simply use the returned content-type as the >accept header on a file-per-file basis?
>On Feb 7, 10:29 am, Jim Wong <jw...@sugarsync.com> wrote: >> What value are you providing in the Accept header? >> -- >> Jim Wong (jw...@sugarsync.com)
>> On 2/6/12 5:32 AM, "Seb" <sebnmul...@gmail.com> wrote:
>> >Hi!
>> >I saw there was an earlier post on this topic but I was unable to >> >solve my problem despite having read it. >> >I am able to obtain fileData URLs but I can only retrieve certain file >> >types. Image files seem to work but .txt >> >and .pdf for example do not. Instead I get a 406 error.
>> >The previous post mentioned that I need to set the appropriate Accept >> >header but I'm not sure >> >what the correct setting should be, especially when retrieval works >> >for some files and not others.
>> >I checked the headers for both files I am unable and able to retrieve, >> >here are respective examples:
>> >{null=[HTTP/1.1 406 Not Acceptable], Date=[Mon, 06 Feb 2012 13:28:44 >> >GMT], Content-Length=[287], Content-Type=[text/html; >> >charset=ISO-8859-1], Accept-Ranges=[bytes], Server=[Noelios-Restlet- >> >Engine/1.1.5]}