We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Bug: file.dimensions is empty

Developer Preview

Brian Litzinger's avatar
Brian Litzinger
711 posts
14 years ago
Brian Litzinger's avatar Brian Litzinger

The old file manager used to return the image dimensions as a property of the returned object. There is a lot more useful info now in the object (thank you), but no width or height of the image is returned.

       
Wes Baker's avatar
Wes Baker
343 posts
14 years ago
Wes Baker's avatar Wes Baker

Hmm, If we’re looking at the same object (and I think we are), then both of those are in there, but they’re mashed into one property:

Object
    caption: null
    date: "June 9, 2011 12:22 pm"
    directory: "1"
    field_1: null
    field_1_fmt: "xhtml"
    field_2: null
    field_2_fmt: "xhtml"
    field_3: null
    field_3_fmt: "xhtml"
    field_4: null
    field_4_fmt: "xhtml"
    field_5: null
    field_5_fmt: "xhtml"
    field_6: null
    field_6_fmt: "xhtml"
    file_hw_original: "960 1280"
    file_id: "143"
    file_name: "77335_4871.jpg"
    file_size: "594.8 KB"
    img_id: "9"
    is_image: true
    metadata: null
    mime_type: "image/jpeg"
    modified_by_member_id: "1"
    modified_date: "1307636566"
    name: "77335_4871.jpg"
    rel_path: "/Users/wes/Development/expressionengine2/images/uploads/77335_4871.jpg"
    short_name: "77335_…871.jpg"
    site_id: "1"
    status: "o"
    thumb: "http://expressionengine2/images/uploads/_thumb/77335_4871.jpg"
    thumb_class: "image"
    title: "77335_4871.jpg"
    upload_date: "1307636566"
    upload_location_id: "1"
    uploaded_by_member_id: "1"

If you look for file_hw_original, it has the height and width in one string and it just needs to split on the space. We’re planning on eventually having both dimensions be separate items, but I’m not sure when that’ll come about.

Wes

       
Brian Litzinger's avatar
Brian Litzinger
711 posts
14 years ago
Brian Litzinger's avatar Brian Litzinger

Ah, missed that. My bad.

       
Wes Baker's avatar
Wes Baker
343 posts
14 years ago
Wes Baker's avatar Wes Baker

No worries, there’s a lot of stuff going on and I too would expect to see the words height or width somewhere.

Wes

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.