Jump to content
Larry Ullman's Book Forums

Deleting Or Editing Pdfs


Recommended Posts

Hi Larry,

Your book is incredibly useful. I created a website for my staff to access pdfs of the different forms we use for an animal hospital. Occasionally, we change the forms content and will need to re-upload the pdf of it. I didn't see a way in your book to delete the pdf if it has already been uploaded. Any recommendations?

Thanks,

Sam

Link to comment
Share on other sites

Hi Larry,

Your book is incredibly useful. I created a website for my staff to access pdfs of the different forms we use for an animal hospital. Occasionally, we change the forms content and will need to re-upload the pdf of it. I didn't see a way in your book to delete the pdf if it has already been uploaded. Any recommendations?

Thanks,

Sam

Depending on if you name them the same, you could run a function to see if the file exists. If it does exists then to delete (unlink()) then rename the new uploaded file as the same filename.

If the file is named differently then there really is no other way, unless you create a "replace" button next to each pdf or a tick option, then it replaces that using the same unlink() and file upload system.

If I was you I'd let the file upload, check existance (if using first option), unlink the old, then rename the new file. That way if the file fails to upload then you don't lose the old one.

If you need any further assistance with what I mentioned, feel free to contact me.

Link to comment
Share on other sites

 Share

×
×
  • Create New...