Part of the EllisLab Network
   
 
Upload “is_image” data
Posted: 07 July 2008 04:51 PM   [ Ignore ]  
Summer Student
Avatar
Total Posts:  28
Joined  03-27-2008

...
var
$full_path        = "";
...

function
do_upload($field = 'userfile') {
...
$this->full_path = $this->upload_path.$this->file_name;
$this->set_image_properties($this->full_path);
...
}

...
function
data() {
    
return array (
            ...

            
'full_path'            => $this->full_path,
            
'is_image'            => $this->is_image
            
...
    );
}

...

function
is_image() {
...
    return
$this->is_image = (in_array($this->file_type, $img_mimes, TRUE) && exif_imagetype($this->full_path));
}

 Signature 

quality JavaScript, PHP5, PostgreSQL
developer & creator http://www.kyky.su
CodeIgniter is my second brain f**k (in good way) - i love it

Profile
 
 
Posted: 10 July 2008 08:50 PM   [ Ignore ]   [ # 1 ]  
Administrator
Avatar
RankRankRankRankRankRank
Total Posts:  6566
Joined  03-23-2006

Sorry to be dense, but what are you requesting?

 Signature 

DerekAllard.com - CodeIgniter, ExpressionEngine, and the World of Web Design
BambooInvoice - Open Source, CodeIgniter powered invoicing.

Profile
MSG
 
 
Posted: 11 July 2008 05:01 AM   [ Ignore ]   [ # 2 ]  
Summer Student
Avatar
Total Posts:  28
Joined  03-27-2008

field ‘is_image’ in upload data has some mistake. i request openoffice document with extension png and ‘is_image’ will be 1

 Signature 

quality JavaScript, PHP5, PostgreSQL
developer & creator http://www.kyky.su
CodeIgniter is my second brain f**k (in good way) - i love it

Profile
 
 
Posted: 11 July 2008 06:41 AM   [ Ignore ]   [ # 3 ]  
Administrator
Avatar
RankRankRankRankRankRank
Total Posts:  6566
Joined  03-23-2006

It runs strictly on the reported mime type, what browser are you using, and what is the mime reported? Exif functions, while more and more common, are not always available to PHP depending on server setup, but this is worth exploring, thanks.

 Signature 

DerekAllard.com - CodeIgniter, ExpressionEngine, and the World of Web Design
BambooInvoice - Open Source, CodeIgniter powered invoicing.

Profile
MSG
 
 
   
 
 
‹‹ Pagination range      Session "security_zone" ››
Post Marker Legend
New Topic New posts Hot Topic Hot Topic with new posts New Poll New Poll Moved Topic Moved Topic Sticky Topic Sticky topic
Old Topic No new posts Hot Old Topic Hot Topic with no new posts Old Poll Old Poll Closed Topic Closed Topic Announcement Announcements
Theme
Change Theme
Visitor Statistics
The most visitors ever was 719, on June 06, 2008 10:16 AM
Total Registered Members: 62402 Total Logged-in Users: 34
Total Topics: 76627 Total Anonymous Users: 2
Total Replies: 413857 Total Guests: 447
Total Posts: 490484    
Members ( View Memberlist )