Forums / Setup & design / image upload with powercontent
Bherly Novrandy
Tuesday 24 February 2009 5:56:16 pm
i have a form with powercontent that use for uploading an image..
<form action={"index.php/powercontent/action"|ezroot} method="POST"> <input type="hidden" name="NodeID" value="{$module_result.view_parameters.nodeId}" /> <input type="hidden" name="ClassIdentifier" value="article" /> <label for='articleTitle'>Title</label> <input type='text' id='articleTitle' class='contact-input' name="powercontent_title_ContentObjectAttribute_ezstring_data_text_pcattributeid" /> <input type="hidden" name="powercontent_author_ContentObjectAttribute_ezstring_data_text_pcattributeid" value="{$user.contentobject.name}" /> <label>Summary</label> <textarea name="powercontent_short_description_ContentObjectAttribute_data_text_pcattributeid" rows="5" cols="30" class="contact-input"></textarea> <label for="comments">Body</label> <textarea name="powercontent_body_ContentObjectAttribute_data_text_pcattributeid" id="comments" rows="10" cols="60" class="contact-input"></textarea> <input type="hidden" name="DoPublish" value="yes" /> <label for="upload">Upload Photo</label> <input type='file' id='upload' class='contact-input' name='powercontent_thumbnail_ContentObjectAttribute_ezimage_data_binaryfilename_pcattributeid' /> <button type='submit' class='contact-send contact-button' name="CreateButton">Submit</button> <button type='reset' class='contact-send contact-button'>Reset</button> <br/> <p> <small>The picture file size should be less than 1 Mb (only support jpg, gif, png)</small> </p> <input type='hidden' name='token' value='""'/> </form>
everything else is update to article except the thumbnail... any suggestion? thx
meriam santos
Sunday 21 February 2010 5:13:00 pm
Hi there,Got a similar error. Just wondering if you were able to find a solution for this.thanks...
Pierandrea Della Putta
Monday 29 November 2010 1:38:15 am
To upload image with powercontent, just use "imagename" field in attribute name of tag input.
Example:
<input class="box" name="powercontent_photocommunity_image_ContentObjectAttribute_data_imagename_pcattributeid" type="file" />