Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Send Image Via Email


Go to End


1347 Views

Avatar
web2works

Community Member, 50 Posts

27 August 2011 at 5:51am

Edited: 27/08/2011 5:52am

I have wrote the attached enquiry form, that allows a user to upload a image.

Everything works and I can view the image via the admin area although in the email the image outputs:
Image: array ( 'name' => 'template_design_04.jpg', 'type' => 'image/jpeg', 'tmp_name' => '/tmp/phpPwiEcC', 'error' => 0, 'size' => 858123, )

Also I need to set a max width/height for the images when displayed via the dataObectManager in the admin area. Where do I put?
public function getDOMThumbnail() {
if($i = $this->YourImage()) {
return $i->CroppedImage(50,50);
}
return false;
}

Thanks for any help or advice you can give me.

Attached Files