Saving Stream as Media Item Options
SoerenS
Posted: Thursday, November 15, 2007 3:57:51 PM

Rank: Fanatic

Joined: 7/25/2006
Posts: 424
Location: Silkeborg, Denmark
Hi all,

I have an image in the form of a system.io.stream (comes from an email attachment) that I want to save as a new media item. Anyone have any clues on how to do that?

I allready have the image as a stream, and have created a new media node of MediaType Image.
But how do I store the stream as a media property of the type Upload?

Any tips or hints is much appreciated.

/SoerenS

Brug for råd til hvordan du driver en god webshop? / Need advice on how to run an effective webshop?
imayat12
Posted: Thursday, November 15, 2007 6:14:52 PM

Rank: Addict

Joined: 7/19/2006
Posts: 649
Location: Preston, UK
Soren,

Have a look in in the umbraco dashboard zip upload code written by niels you should be able to grab something from there. You will need to create the image with guid like he does to media dir then create the media item for it and assign.

Regards


Ismail

Level 2 certified. If it aint broke dont fix.
SoerenS
Posted: Thursday, November 15, 2007 6:23:31 PM

Rank: Fanatic

Joined: 7/25/2006
Posts: 424
Location: Silkeborg, Denmark
You know where I can find the code for it?

I've allready been searching for it without any luck.

/SoerenS

Brug for råd til hvordan du driver en god webshop? / Need advice on how to run an effective webshop?
imayat12
Posted: Thursday, November 15, 2007 6:25:45 PM

Rank: Addict

Joined: 7/19/2006
Posts: 649
Location: Preston, UK
Its in codeplex here

Level 2 certified. If it aint broke dont fix.
SoerenS
Posted: Thursday, November 15, 2007 11:23:48 PM

Rank: Fanatic

Joined: 7/25/2006
Posts: 424
Location: Silkeborg, Denmark
Thanks mate!

I debugged that a bit, along with the code for the Upload Datatype, and got my stuff to work :p

/SoerenS

Brug for råd til hvordan du driver en god webshop? / Need advice on how to run an effective webshop?
Users browsing this topic
Guest


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.