The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End upload pdf and create link to download Re: upload pdf and create link to download


There’s two parts to this: the file upload bit and the link generating bit. You probably need to make sure that the file gets uploaded to a specific directory reserved for such things

The file upload bit is covered by something like <input type=”file”….. >. The ‘action’ points to a form processor that checks out the file to make sure it’s what you think it is (size, file type etc), uploads it (to PHP’s temp directory) and then moves it to your uploaded files directory with move_uploaded_file().

Your ‘other page’ will need some PHP code to check out the uploaded files directory and display links to anything it finds there.

There’s a tutorial on uploading files here. I’ve not read it thru in detail but, at a glance, it seems to cover all the important bits.

One word of warning tho – do make sure that only authorised people can use the upload form and the form processor or you’ll get all sorts of crap in there!