Bug reports Found a bug? Post it here please.
Version 4.x > Bug reports > DocumentHelper.AddAttachment View modes: 
User avatar
ganniazz-hotmail - 5/4/2009 3:52:11 AM

I am trying to add multiple images to a document type.

The problem is that I am resizing one image into three image sizes on the fly and currently the AddAttachment Method accepts the file in postedfile format or the filepath string.

I require to insert the actual bytes of the image.

Is there some type of work around for this problem or could I create an altenate method so that I may use the file bytes?

Thank you

User avatar
Kentico Developer
Kentico Developer
kentico_martind - 5/23/2009 4:16:39 AM

You can create new instance of AttachmentInfo class (please see sample code in managing attachments section of Dev.Guide). Then you can set actual bytes of the image into AttachmentBinary property of this object.

Best Regards,

Martin Dobsicek