<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>