Viewing 5 reply threads
  • Author
    Posts
    • #1054
      atomworks
      Member

      Hi guys,

      Sorry to bring up the media uploader again, you must be getting a bit sick of it at the moment.

      I’ve got an issue when using it to upload non-image files. It’s on line 824 of the piklist.js file and it relates to there not being attachment.sizes.full. Much of the code in that function is based off the assumption that you’re dealing with an image. First glance attachment.type will specify “image” so it’s easy to identify but I won’t have time to dig in and be any more use until later in the week.

    • #1057
      Steve
      Keymaster

      @atomworks

      Can you be a bit more specifc? Which field are you using: Basic upload or Featured Image? What’s the error you are getting?

    • #1066
      atomworks
      Member

      Hi Steve,

      Sorry for the delay getting back to you, must have forgotten to tick the follow up e-mail notification box.

      This is the code I’m using to set up the field inside my meta box.

        piklist('field', array(
          'type' => 'file'
          ,'field' => 'guide_file'
          ,'scope' => 'post_meta'
          ,'label' => 'Add File(s)'
          ,'description' => 'The guide file for the user to download.'
          ,'options' => array(
            'title' => 'Add File(s)'
            ,'button' => 'Add'
          )
        ));

      This brings up the error:

      Uncaught TypeError: Cannot read property 'full' of undefined - piklist.js?ver=0.8.0b5:824

      The script seems to be looking for information that is supplied when you choose an image file and doesn’t have a way to distinguish and handle non-image files at this time.

    • #1070
      Steve
      Keymaster

      Working on it…

    • #1078
      Steve
      Keymaster

      Fixed in next version.

    • #1112
      Steve
      Keymaster
Viewing 5 reply threads
  • You must be logged in to reply to this topic.