Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Need Help in downloading a file from server
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  4 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
ravi  
View profile  
 More options Jul 13 2012, 7:55 am
From: ravi <4uall.raviku...@gmail.com>
Date: Fri, 13 Jul 2012 04:55:18 -0700 (PDT)
Local: Fri, Jul 13 2012 7:55 am
Subject: Need Help in downloading a file from server

Hi,

I am trying to download a file from server like this

*response.headers['Content-Type'] =  'text/csv'*
*
*
*response.headers['Content-disposition'] = 'attachment;
filename=suggest.csv'*
*
*
*fapp = FileApp(<Full File Path>)*
*
*
*return fapp(request.environ, self.start_response)*

But i am getting trying to download a file from server like this *
*
*
**"Method Not Allowed**
*

*The method POST is not allowed for this resource.\r\nYou cannot POST a file
*
*WSGI Server"*

Please help me

Thanks


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Craig Younkins  
View profile  
 More options Jul 13 2012, 10:28 am
From: Craig Younkins <cyounk...@gmail.com>
Date: Fri, 13 Jul 2012 10:28:51 -0400
Local: Fri, Jul 13 2012 10:28 am
Subject: Re: Need Help in downloading a file from server

It looks more like you are sending a POST request to download a file. POST
is for requests that modify server state. Use GET since downloading a file
does not.

Craig Younkins


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
ravi  
View profile  
 More options Jul 16 2012, 10:38 pm
From: ravi <4uall.raviku...@gmail.com>
Date: Mon, 16 Jul 2012 19:38:05 -0700 (PDT)
Local: Mon, Jul 16 2012 10:38 pm
Subject: Re: Need Help in downloading a file from server

Hi Craig,

Thanks for the reply. I can not use GET method as i want to pass huge data
to the server.

Right now what i am doing is first sending the POST request and getting
response as file path. next sending a GET request in success callback
function to get the data.

But here the problem i am facing is csv file ouput is not in correct
format. all rows data coming in single line.

Could you please suggest me in this issue

Thanks & Regards,
Ravi Kumar


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jonathan Vanasco  
View profile  
 More options Jul 17 2012, 12:13 pm
From: Jonathan Vanasco <jonat...@findmeon.com>
Date: Tue, 17 Jul 2012 09:13:51 -0700 (PDT)
Local: Tues, Jul 17 2012 12:13 pm
Subject: Re: Need Help in downloading a file from server

On Jul 16, 10:38 pm, ravi <4uall.raviku...@gmail.com> wrote:

> But here the problem i am facing is csv file ouput is not in correct
> format. all rows data coming in single line.

That could be a text encoding issue.  The single line could be - for
example , but my guess - because you are on a Windows machine but
instead of creating \r\n newlines, your app is just creating \n .  You
also could not be escaping the newlines correctly -- i noticed your
error has the characters '\r\n'.

Newline in different operating systems:
\r\n = Windows
\n = Unix
\r = Mac

Read this page:

http://forums.codeguru.com/showthread.php?253826-C-String-What-is-the...


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »