NetTalk Central
Toggle navigation
Login
Register
×
Welcome,Guest
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
NetTalk Central
»
NetTalk Web Server
»
Web Server - Ask For Help
»
File Download Question
« previous
next »
Print
Pages: [
1
]
Author
Topic: File Download Question (Read 3271 times)
astahl
Sr. Member
Posts: 308
File Download Question
«
on:
November 21, 2014, 05:23:26 AM »
Hi,
I have a NetWebPage that is being called from an outside source to download a user specific file. If the file was not created for them how can I return back to them a message like "File not available, try later"?
Ashley
Logged
Bruce
Global Moderator
Hero Member
Posts: 11250
Re: File Download Question
«
Reply #1 on:
November 25, 2014, 11:29:31 PM »
Hi Ashley,
in the page you can do a
p_web.SendError('503','File Not yet available','the file is not available yet, try again later')
and then do a return.
the exact code to use is somewhat up to you - there's no HTML reply code that matches this situation exactly - but there's a discussion on codes here;
http://stackoverflow.com/questions/9794696/best-http-status-code-in-rest-api-for-not-ready-yet-try-again-later
Of course, you could just returna page that says "File is not yet ready".
cheers
Bruce
Logged
astahl
Sr. Member
Posts: 308
Re: File Download Question
«
Reply #2 on:
December 03, 2014, 09:46:59 AM »
Thanks Bruce
Logged
Print
Pages: [
1
]
« previous
next »
NetTalk Central
»
NetTalk Web Server
»
Web Server - Ask For Help
»
File Download Question