How can I get a pdf data (stored in datastore as blob) from iphone if i make a request to google app engine?
When I use self.response.out.write('asadasd'); in google app engine code I can see this 'asadasd' in iPhone.
开发者_JAVA百科But i don't know how to set this communication so that i can get a pdf data from i phone.
Thanks in advance!
If I understand corretly, you want to send an pdf file to a webapplication, right? I think it would be a solution to base64 code the binary data of the pdf on the iphone (that comes from your blob) and then send it via http post to the webapplication.
You should set the proper headers before writing to the output stream:
self.response.headers['Content-Type'] = 'application/pdf'
self.response.headers['Content-Disposition'] = 'attachment;filename=filename.pdf'
self.response.out.write(...)
精彩评论