Yii Framework Forum: Upload Image with Image Title - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Upload Image with Image Title

#1 User is offline   Afnan 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 36
  • Joined: 18-October 11

Posted 18 January 2012 - 12:11 PM

I want to upload Images to cars model for example car may have interior ,exterior or some custom thing done that user would need to tell about.

I want to upload Image along with Title. I am trying using x Upload.

I have following questions

How can you add Title while adding Picture?
What coding you need to have in Controller to save Images as well as Title.
Following is my View code

<?php
$this->widget('ext.xupload.XUploadWidget', array(
    'url' => Yii::app()->createUrl("site/upload", array("parent_id" => 1)),
    'model' => $model,
    'attribute' => 'file',
    'multiple'=>true,
    'options' => array(
        'beforeSend' => 'js:function (event, files, index, xhr, handler, callBack) {
            handler.uploadRow.find(".file_upload_start button").click(callBack);
            }'
        ),
    ));
?>
<button id="start_uploads" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-icon-primary">
    <span class="ui-button-icon-primary ui-icon ui-icon-circle-arrow-e"></span>
    <span class="ui-button-text">Start Uploads</span>
</button>
<script type="text/javascript">
$('#start_uploads').click(function () {
    $('.file_upload_start button').click();
});
</script>

any help is appreciated thanks:)
0

#2 User is offline   Afnan 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 36
  • Joined: 18-October 11

Posted 19 January 2012 - 03:30 AM

O come on no one how come every one recommend this extension with no support :(
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users