Does folder name need to be a folder within the web application ?

Jul 8, 2008 at 2:47 AM
Does folder name need to be a folder within the web application i.e foldername="uploaded"

I tried using a path on my server as per below and received the error label

FolderName="C:\uploads\user2\admin\"

If anyone could help that would be great

thanks

Coordinator
Jul 8, 2008 at 5:21 AM
Well if you want to do that you have to give permissions to your IIS user to write in that folder...
Jul 8, 2008 at 6:36 AM

thanks for your help BUT :)

my iis user has write settings.  Tried it again and it did not work see below error
any more suggestions ?


Exception information:

 

Exception type: HttpException

Exception message: 'd:\test\' is not a valid virtual path.

 

Coordinator
Jul 8, 2008 at 4:24 PM
A yes, the adapter will only work with a virtual path. If you want something else, remove your adapter and use FileReceived event like this:
<SCRIPT language="C#" runat="server">
protected void FileReceived(Object sender, FileReceivedEventArgs e){
    e.File.Save("C:\blabla\"+e.File.FileName);
}
</SCRIPT>

<fjx:FileUploader ID="FileUploader1" OnFileReceived="FileReceived" runat="server" ></fjx:FileUploader>


Jul 8, 2008 at 11:59 PM
Edited Jul 9, 2008 at 12:02 AM
Thanks for your help sorry but i have a issue i tried the following and received he follwoign error : Error 1 'FileReceived' is not a member of 'ASP.default2_aspx'. C:\ajaxupload\Default2.aspx 15 any ideas ? thanks so much for your help up till now :) 


Partial

Class Default2

 

 

Inherits System.Web.UI.Page

 

 

Protected Sub FileUploader2_FileReceived(ByVal sender As Object, ByVal e As com.flajaxian.FileReceivedEventArgs) Handles FileUploader2.FileReceived

 

e.File.SaveAs(

"C:\ftp\" + e.File.FileName)

 

 

End Sub

 

End

Class

 


<%

@ Page Language="VB" AutoEventWireup="false" CodeFile="Default2.aspx.vb" Inherits="Default2" %>

 

<%

@ Register TagPrefix="fjx" Namespace="com.flajaxian" Assembly="com.flajaxian.FileUploader" %>

 

<!

DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

 

<

html xmlns="http://www.w3.org/1999/xhtml" >

 

<

head runat="server">

 

 

<title>Untitled Page</title>

 

</

head>

 

<

body>

 

 

<form id="form1" runat="server">

 

 

<fjx:FileUploader ID="FileUploader2" OnFileReceived="FileReceived" runat="server" ></fjx:FileUploader>

 

 

</form>

 

</

body>

 

</

html>

 


 

 

Coordinator
Jul 9, 2008 at 12:29 AM
Well the way you have it defined here your method is called FileUploader2_FileReceived so you should use 
<fjx:FileUploader ID="FileUploader2" OnFileReceived="FileUploader2_FileReceived" runat="server" ></fjx:FileUploader>
Jul 9, 2008 at 4:27 AM
thank you again and so on :)