This is a migrated thread and some comments may be shown as answers.

AsyncUpload Email Attachment

1 Answer 170 Views
AsyncUpload
This is a migrated thread and some comments may be shown as answers.
Shawn Garton
Top achievements
Rank 1
Shawn Garton asked on 13 Jul 2011, 10:27 PM
It appears there used to be an integration example on how to use the Upload control to attach a file to an email directly from the temp folder and not actually upload to a target folder. I can not find this example anywhere.

Does anyone have some sample code to attach the temp file to an email and send it without saving it somewhere. 

I have sucessfully saved the file on postback and then sent it, but I would like to just attach the temp file and let the control delete the temp file after the message was sent.

1 Answer, 1 is accepted

Sort by
0
Peter Filipov
Telerik team
answered on 15 Jul 2011, 02:16 PM
Hello Shawn Garton,

My suggestion for your scenario is the following:
Please do not set TargertFolder property of the RadAsyncUpload(to prevent moving the file form temporary folder to target folder). When you submit the page FileUploaded event is fired for every uploaded file. UploadedFile property form the event arguments have an access to the uploaded file. The files into the temporary folder will be automatically deleted from ASP.NET framework.
Here is the demo with an email form.

All the best,
Peter Filipov
the Telerik team

Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

Tags
AsyncUpload
Asked by
Shawn Garton
Top achievements
Rank 1
Answers by
Peter Filipov
Telerik team
Share this question
or