Upload JPEG and PDF

See all posts See thread Reply

Re: Upload JPEG and PDF new!
by colin, 9 years, 4 months ago
Yes, by default the class blocks dangerous files, or at least some of them. Check out the no_script parameter.

As for the PDF, you need to allow the correct MIME type. For instance, here below, you are allowing PDF and image files:
$handle->allowed = array('application/pdf','image/*');
Reply
Re: Upload JPEG and PDF new!
by Batın, 9 years, 4 months ago
Yeah Thanks for answer,
I know the MIME types and understand,
What is the no_script parameter :)
What should I do to make it safer :)Reply
Re: Upload JPEG and PDF new!
by colin, 9 years, 4 months ago
You need to set the alowed parameter, as above, to allow only some MIME types (here images and PDF). The rest will be fine, the default settings are safe.Reply
Re: Upload JPEG and PDF new!
by Batın, 9 years, 4 months ago
Thanks for information :)Reply