Connecting Tech Pros Worldwide Help | Site Map

upload with authentication

  #1  
Old May 25th, 2009, 02:12 PM
Newbie
 
Join Date: May 2009
Posts: 1
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?

Last edited by jhardman; May 26th, 2009 at 09:23 PM. Reason: added code tags
  #2  
Old May 26th, 2009, 09:26 PM
jhardman's Avatar
Moderator
 
Join Date: Jan 2007
Location: logan, utah
Posts: 2,686

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
  #3  
Old June 17th, 2009, 06:07 PM
Expert
 
Join Date: Nov 2007
Posts: 126

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