Jump to content

Recommended Posts

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?

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.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.