Live Helper Chat support forum.. Forum is locked. New place for questions - Github Discussions

You are not logged in.

Announcement

#1 2015-02-12 04:50:41

chilli_chetan
Member
Registered: 2014-12-30
Posts: 39

MIME type for file uploaded by user or operator

Hi,

How to use MIME type for file uploaded by user or operator in the file upload widget process.

Can you please suggest me?

Thanks,

Offline

#2 2015-02-12 05:55:35

remdex
Administrator
From: Lithuania
Registered: 2012-09-23
Posts: 3,661
Website

Re: MIME type for file uploaded by user or operator

I'm not sure what you mean there...
Allowed file types can be configured in lhc itself.

Offline

#3 2015-02-12 06:19:31

chilli_chetan
Member
Registered: 2014-12-30
Posts: 39

Re: MIME type for file uploaded by user or operator

We are giving extension in admin part for file but we are not checking MIME type of the file Lets have a example if user has a file called "test.php". After changing the extension type from test.php to test.gif then it is able to accepted in the system because .gif file extension is acceptable.

So how can we use mime type of the file in the process.

Thanks,

Offline

#4 2015-02-12 06:22:09

remdex
Administrator
From: Lithuania
Registered: 2012-09-23
Posts: 3,661
Website

Re: MIME type for file uploaded by user or operator

Well for that you will have to hack into kernel itself.
In general all files are uploaded and stored without any extension internally. Even their name is sha1 summary.

So i'm really not sure it's needed this check which you are trying to make. If your users upload gif and can execute it as php just manipulating URL request, it's just your server misconfiguration, nothing more.

Offline

Board footer