Upload JPEG and PDF

See all posts Reply

Upload JPEG and PDF new!
by Batın, 9 years, 4 months ago
Hi,
Firstly, I am sorry because of my engilish. I want to ask two questions. I am using your class in my website to upload JPEG files. Only I do not any control on file because I think your class doing every control and block the shell files. Is it right ? :D What should I do ? Do I make some control but how ? I am new in this job.
Second question is the uploading PDF. Does the class help me to upload the pdf files in security like images. Is there a risk for shell
Can you tell me the answer easily :D you know my engilish :DReply
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