dezu Posted June 13, 2015 Share Posted June 13, 2015 I'm using _POST to post a file upload to a php script I want it to go through authentication and then return the generated link for the file. On the main page I want it to open a new tab to the source of the file that was uploaded. How do I go about this? Quote Link to comment Share on other sites More sharing options...
requinix Posted June 14, 2015 Share Posted June 14, 2015 Do the authentication before accepting the file upload, then confirm they're still authenticated when actually accepting the upload. Authentication at the time of an upload isn't a great idea because (a) the user has to wait for the upload before they'll get the authentication dialog, and thus (b) if they fail authentication, such as by mistyping their password, then they have to go through the upload process another time. For the new tab, the simplest thing would be to point the form to a new page (target=_blank) and have the output of the upload script be the "source of the file" or whatever. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.