Connecting Tech Pros Worldwide Forums | Help | Site Map

upload with authentication

Newbie
 
Join Date: May 2009
Posts: 1
#1: May 25 '09
I am using ActiveXobject to copy JPG file from client machine to server machine.
Following is the code snippet
Expand|Select|Wrap|Line Numbers
  1. var objFSO = new ActiveXObject("Scripting.FileSystemObject");
  2.  
  3.     if (objFSO.FileExists(data.value)) {
  4.         var filestr = objFSO.GetFile("C:\\temp\\tmp.jpg");
  5.          var temp = "\\\\serverip\\Share\\tmp.jpg";       
  6.         filestr.Copy(temp);
  7.  
  8.     }
i need to add server credententials to copy jpg file from client to server
Is there any way to add authentication for server in above scenerio?

jhardman's Avatar
Moderator
 
Join Date: Jan 2007
Location: logan, utah
Posts: 2,690
#2: May 26 '09

re: upload with authentication


In classic ASP, authentication has to be programmed manually, that means setting up a form and validating the input. Or if you are just checking that the client is on a particular network layer (for an intranet, for example) then you just need to check the request.servervariables for the sender IP. Do either of these options sound like what you want to know?

Jared
Expert
 
Join Date: Nov 2007
Posts: 126
#3: Jun 17 '09

re: upload with authentication


Quote:

Originally Posted by vini rally View Post

i need to add server credententials to copy jpg file from client to server
Is there any way to add authentication for server in above scenerio?

Can you explain "server credentials" and "authentication" in this case?

Are you trying to ensure the person doing the uploading is on a particular Active Directory domain, or user group?

Is the "authentication" arbitrary, e.g. an assigned username/password not controlled by the server?

Are you trying to ensure the user is on a particular network (IP submask)?
Reply