<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" id="owaParaStyle">P {margin-top:0;margin-bottom:0;}</style>
</head>
<body fpstyle="1" ocsi="0">
<div style="direction: ltr;font-family: Arial;color: #000000;font-size: 12pt;">Thanks for your thoughts.<br>
<br>
I can serve the file if I put it in 'static' folder, but not in 'upload' folder.<br>
I guess 'static' is exposed by default.<br>
I am not sure how to expose any other folder like 'upload'.<br>
<br>
<div><br>
<div style="font-family:Tahoma; font-size:13px">
<div style="font-family:Tahoma; font-size:13px">
<div style="font-family:Tahoma; font-size:13px">
<div style="font-family:Tahoma; font-size:13px">
<div style="font-family:Tahoma; font-size:13px">
<div style="font-family:Tahoma; font-size:13px">
<div class="BodyFragment"><font size="2"><span style="font-size:10pt">
<div class="PlainText"><font face="Arial">Thanks,<br>
Abhinav</font><br>
  <br>
 </div>
</span></font></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div style="font-family: Times New Roman; color: #000000; font-size: 16px">
<hr tabindex="-1">
<div id="divRpF189110" style="direction: ltr;"><font size="2" color="#000000" face="Tahoma"><b>From:</b> Flask [flask-bounces+akumar=intrexon.com@python.org] on behalf of sidwoodstock . [sidwoodstock@gmail.com]<br>
<b>Sent:</b> Tuesday, November 21, 2017 9:35 AM<br>
<b>To:</b> flask@python.org<br>
<b>Subject:</b> Re: [Flask] Serving a file to downalod AND print message on screen<br>
</font><br>
</div>
<div></div>
<div>
<div dir="ltr">
<div class="gmail_extra">Just some thoughts:</div>
<div class="gmail_extra"><br>
</div>
<div class="gmail_extra">- Verify file is truly placed in /uploads/ </div>
<div class="gmail_extra">- Verify your file server is exposing your uploads directory.</div>
<div class="gmail_extra">- You can move around the code in your template which shows flashed messages, perhaps move it to a place which gets called when you want.</div>
<div class="gmail_extra"><br>
</div>
<div class="gmail_extra">To truly help with the uploads / file not found issue, it'd be helpful to know what other packages you're using.</div>
<div class="gmail_extra"><br>
</div>
<div class="gmail_extra"><br>
</div>
<div class="gmail_extra">Scott Woodstock </div>
<div class="gmail_extra"><br>
</div>
<div class="gmail_extra"><br>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Fri, Nov 17, 2017 at 9:00 AM, <span dir="ltr"><<a href="mailto:flask-request@python.org" target="_blank">flask-request@python.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex; border-left:1px #ccc solid; padding-left:1ex">
Send Flask mailing list submissions to<br>
        <a href="mailto:flask@python.org" target="_blank">flask@python.org</a><br>
<br>
To subscribe or unsubscribe via the World Wide Web, visit<br>
        <a href="https://mail.python.org/mailman/listinfo/flask" rel="noreferrer" target="_blank">
https://mail.python.org/mailma<wbr>n/listinfo/flask</a><br>
or, via email, send a message with subject or body 'help' to<br>
        <a href="mailto:flask-request@python.org" target="_blank">flask-request@python.org</a><br>
<br>
You can reach the person managing the list at<br>
        <a href="mailto:flask-owner@python.org" target="_blank">flask-owner@python.org</a><br>
<br>
When replying, please edit your Subject line so it is more specific<br>
than "Re: Contents of Flask digest..."<br>
<br>
<br>
Today's Topics:<br>
<br>
   1. Re: Serving a file to downalod AND print message on screen<br>
      (Geert Stappers)<br>
<br>
<br>
------------------------------<wbr>------------------------------<wbr>----------<br>
<br>
Message: 1<br>
Date: Thu, 16 Nov 2017 21:16:10 +0100<br>
From: Geert Stappers <<a href="mailto:stappers@stappers.nl" target="_blank">stappers@stappers.nl</a>><br>
To: <a href="mailto:flask@python.org" target="_blank">flask@python.org</a><br>
Subject: Re: [Flask] Serving a file to downalod AND print message on<br>
        screen<br>
Message-ID: <<a href="mailto:20171116201610.GX21385@gpm.stappers.nl" target="_blank">20171116201610.GX21385@gpm.st<wbr>appers.nl</a>><br>
Content-Type: text/plain; charset=us-ascii<br>
<br>
On Wed, Nov 15, 2017 at 05:47:19PM +0000, Kumar, Abhinav wrote:<br>
> Hi,<br>
><br>
> After I process some data, I want to write log output to the screen and let user download the results as a zip file.<br>
><br>
> I tried flash, but that does not print message until the app is executed next time.<br>
><br>
> I can't possible use two return statements (one for send_file for download and other for rendering a template).<br>
><br>
> I could use only template rendering and provide a link to download the results file in the template html file, but that link says 'file not found'...<br>
><br>
> In my template file I have code like<br>
>     Please download the result  <a href=/upload/results.zip>here<<wbr>/a><br>
> And I place the results.zip file in "upload" folder before calling render_template.<br>
><br>
> But the app says "The requested URL was not found on the server"<br>
> The URL it points to is "<a href="http://akumar-linux2:5000/upload/results.zip" rel="noreferrer" target="_blank">http://akumar-linux2:5000/upl<wbr>oad/results.zip</a>"<br>
><br>
<br>
FWIW   I read above _two_ problems:<br>
 * URL not found<br>
 * wanting to write to screen<br>
<br>
<br>
Advice: Start with fixing the "URL not found".<br>
<br>
<br>
<br>
<br>
<br>
Groeten<br>
Geert Stappers<br>
Seen both postings from original poster, replying on one.<br>
--<br>
Leven en laten leven<br>
<br>
<br>
------------------------------<br>
<br>
Subject: Digest Footer<br>
<br>
______________________________<wbr>_________________<br>
Flask mailing list<br>
<a href="mailto:Flask@python.org" target="_blank">Flask@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/flask" rel="noreferrer" target="_blank">https://mail.python.org/mailma<wbr>n/listinfo/flask</a><br>
<br>
<br>
------------------------------<br>
<br>
End of Flask Digest, Vol 29, Issue 3<br>
******************************<wbr>******<br>
</blockquote>
</div>
<br>
</div>
</div>
</div>
</div>
</div>
<br>
<hr>
<font face="Arial" color="Black" size="2"><br>
CONFIDENTIAL TRANSMISSION - To the extent this electronic communication or any of its attachments contain information that is not in the public domain, such information is considered by Intrexon Corporation to be confidential and proprietary. This communication
 is expected to be read and/or used only by the individual(s) for whom it is intended. If you have received this electronic communication in error, please reply to the sender advising of the error in transmission and delete the original message and any accompanying
 documents from your system immediately, without copying, reviewing or otherwise using them for any purpose. Thank you for your cooperation.<br>
</font>
</body>
</html>