Jump to content

File upload when file repeated


johnhenry
Go to solution Solved by johnhenry,

Recommended Posts

I wonder if anyone knows whether this is possible,  Sorry if this should be in the html section, but the rest is a php script.

 

I have to upload a file which always stays the same,  When it is processed for upload I change the name according to some other criteria. 

 

That is all done and working, but what I would like to do is that the person doing the upload does not have to choose the file each time.

 

I tried putting in a value attribute into the form field like this..

<input type="file" name="filename" value="55656-Oct21-2.pdf" size="20">

It seems to ignore the value and processes nothing. Choosing the file works OK.  I just want them to be able to press 'Submit' without looking for it.

 

 

 

Still no joy.

 

Ideas would be appreciated
 

Link to comment
Share on other sites

I tried out the renaming idea, and I put the renamed file into a new folder. It works well but the problem is that it deletes the master file.

 

How can I do this without losing the original?

 

Here is what I did.

rename("pdf/55656-Oct21-2.pdf", "pdfs/55656.pdf");

 

Link to comment
Share on other sites

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.