BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

File copy via app server

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (Multi-Tier)
View previous topic :: View next topic  
Author Message
Red
Guest





PostPosted: Mon Feb 14, 2005 9:49 pm    Post subject: File copy via app server Reply with quote



Situation:

D7, 3T C/S Application, IB 6.0.2.0
Database and Application working good.

Requirement:

My application "manages" about 150,000 files. These are stored on a
file server. My app uses the 3T C/S app to "look up" the file name it
needs to upload, download or delete, then my client uses CopyFile()
(complete with the \server_ip_addressfoldername filename prefixes)
to do the actual upload or download or delete directly from the client
PC to the file server PC, (bypassing the appserver) which means the
file server PC must have a folder structure and permissions on those
folders that allow all individual users to read, write, and delete the
files. If the user were to know the IP address of the file server he
could access the files directly, which is no problem, because the user
has full access to those files anyway. The entire 3T C/S app is just
for assissting with the "lookup" chore.

Danger:

User could, out of curiosity, explore the folders directly (no danger)
and then could accidentally select all files and hit the delete key
(pain in the asterisk to restore).

Safety measure:

Set the permissions on the folders on the file server machine to allow
only the app server machine to do deletes (or even copies for that
matter)

My question:

In order to allow the app server to perform the upload or download of
a file, I could write a method in my TRemoteDataModule that would have
a CopyFile() in it that would work just like the one currently in my
client .exe. However, I have discovered that in order to do this, I
would need the true IP address of the client PC.

My problem:

I have also discovered that obtaining the IP address of my local PC is
more difficult than I thought.

a) It's not readily available in a system variable (that I can find
anyway)

b) Even if I could find it, it might not be the same IP address that
the app server "sees" my client PC as.

I've read that a setup using Indy components could give me the IP
address I'm after, but, I'm kind of leary about putting an indy server
in my TRemoteDataModule because I don't know how it will interfere
with the components that are already there (TProviders, TSQLQueries).
I'm a newby at Indy and all the indy components seem to all be built
for a whole different approach than using TRemoteDataModules. (Indy
would use a web server. It seems way way overkill to build an entire
app within an app just to get an IP address)

Anyone got any suggestions on a simple way to get the correct IP
address of a client machine when it's talking to a TRemoteDataModule?

Kev.




Back to top
Patrick
Guest





PostPosted: Mon Feb 14, 2005 10:00 pm    Post subject: Re: File copy via app server Reply with quote



I have this scenario, and I have the client copy the file to an 'open'
folder and then have the appserver (with it's account) move it to the
destination folder. Upon success the client deletes the source file.


Back to top
Bill Todd
Guest





PostPosted: Tue Feb 15, 2005 1:27 am    Post subject: Re: File copy via app server Reply with quote



I can not help with getting the IP address but if you want to copy files
through the AppServer interface see
http://bdn.borland.com/article/0,1410,25982,00.html

--
Bill Todd (TeamB)
TeamB cannot answer questions received via email
Back to top
TOndrej
Guest





PostPosted: Wed Feb 16, 2005 8:53 pm    Post subject: Re: File copy via app server Reply with quote

Quote:
My question:

In order to allow the app server to perform the upload or download of
a file, I could write a method in my TRemoteDataModule that would have
a CopyFile() in it that would work just like the one currently in my
client .exe. However, I have discovered that in order to do this, I
would need the true IP address of the client PC.

My problem:

I have also discovered that obtaining the IP address of my local PC is
more difficult than I thought.

a) It's not readily available in a system variable (that I can find
anyway)

b) Even if I could find it, it might not be the same IP address that
the app server "sees" my client PC as.

Hi,

have a look at this example:
Access client's IP address from a DataSnap remote data module
http://cc.borland.com/ccweb.exe/listing?id=22009
Works with TWebConnection and TSocketConnection.

HTH
TOndrej

Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (Multi-Tier) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.