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

File upload problem with Medium Trust Level Permissions

0 Answers 56 Views
Upload (Obsolete)
This is a migrated thread and some comments may be shown as answers.
Gonzalo
Top achievements
Rank 1
Gonzalo asked on 08 Mar 2010, 01:28 PM
Hello Good Morning.
I am using in my web application RadUpload control and I would love if I could explain how I do in order to upload a file to a host with mid-level permissions as I can not do it as explained in the demo.
The load is performed as follows.
In the. Aspx is a rad control: upload.
In the. Aspx.vb in the event of the submit button uploads are handled, ie pirmero names are changed to save a file not repeated in the target folder and set the directory in which store the same.

Sample Code
           If Foto.UploadedFiles.Count> 0 Then
                
For Each uploadedFile As UploadedFile In Foto.UploadedFiles
                    
TargetFolder Dim As String = Server.MapPath ( "~ / Images / Pictures" Notes ")
                    
FileName = DateTime.Now.Ticks.ToString () & archivoSubido.GetExtension ()
                    
archivoSubido.SaveAs (Path.Combine (TargetFolder, FileName), False)
                    
Next
                
strSql = strSql & ", [Picture]
                
strSqlValues = strSqlValues & " '" & FileName & "'"
            
End If

Grettings

No answers yet. Maybe you can help?

Tags
Upload (Obsolete)
Asked by
Gonzalo
Top achievements
Rank 1
Share this question
or