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

RaduploadContext

4 Answers 102 Views
Upload (Obsolete)
This is a migrated thread and some comments may be shown as answers.
Philip Saltskog
Top achievements
Rank 2
Philip Saltskog asked on 21 Aug 2008, 07:50 AM
Any solution on this problem?

Dim file As UploadedFile = RadUploadContext.Current.UploadedFiles(fileBild.UniqueID) 

I'm using a regular <input type="file"> for the selection of file and it's always empty.
I try this
Dim file As UploadedFile = UploadedFile.FromHttpPostedFile(Request.Files(fileBild.UniqueID)) 
And I get an error in here too?

Do you have an example of this in ajaxified version :)

/Thanks

4 Answers, 1 is accepted

Sort by
0
Veselin Vasilev
Telerik team
answered on 21 Aug 2008, 08:05 AM
Hi Philip Saltskog,

What is the error that you get when you use this:
Dim file As UploadedFile = UploadedFile.FromHttpPostedFile(Request.Files(fileBild.UniqueID)) 

You can also try:
Dim file As UploadedFile = UploadedFile.FromHttpPostedFile(Request.Files(0)) 


Best wishes,
Veskoni
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Philip Saltskog
Top achievements
Rank 2
answered on 21 Aug 2008, 09:20 AM
I'm using this in another projekt.

Dim

file As UploadedFile = UploadedFile.FromHttpPostedFile(Request.Files(fileBild.UniqueID))


I get the error when fileBild is empty

            Dim file As UploadedFile = UploadedFile.FromHttpPostedFile(Request.Files(fileBild.UniqueID))
            If Not file Is Nothing Then
                If file.FileName.Trim().Length > 0 And file.ContentLength > 0 Then
   ' Things todo

                End If
            End If

Web.config

<httpHandlers>    
 <add verb="*" path="Telerik.RadUploadProgressHandler.ashx" type="Telerik.Web.UI.RadUploadProgressHandler, Telerik.Web.UI" />
</httpHandlers>

<httpModules>
      <add name="RadUploadModule" type="Telerik.Web.UI.RadUploadHttpModule, Telerik.Web.UI" />
</httpModules>

<

asp:FileUpload ID="fileBild" runat="server" />

/Thanx

0
Veselin Vasilev
Telerik team
answered on 21 Aug 2008, 10:59 AM
Hello Philip Saltskog,

I tried that code, but it worked fine on my side. Can you please open a support ticket and send us a sample running project that exhibits the problem?


Sincerely yours,
Veskoni
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Philip Saltskog
Top achievements
Rank 2
answered on 21 Aug 2008, 11:26 AM
Yes ,sure.
Tags
Upload (Obsolete)
Asked by
Philip Saltskog
Top achievements
Rank 2
Answers by
Veselin Vasilev
Telerik team
Philip Saltskog
Top achievements
Rank 2
Share this question
or