Jump to content

How to get the full file path???


Gustavo.deo

Recommended Posts

Good morning friends!!!

I should not have expressed myself well, I need to get the path of the source file (the file path of the end user's machine) ...

Taking advantage of the opportunity, if I need to write the file on the server as permanent file (not as temporary file in the cache folder) ... anyone have any suggestions?

 

Thanks!!!

Link to comment
Share on other sites

You use an uniFileUpload and want to get the path of the file on client machine?

 

Then see #2.

 

 

Sorry my english but I use a translator !!!

 

Okay clarified my doubt !!! But would you have some way to rename or delete this file from the client machine ???

And if I want to save this file from the fileupload to another folder other than temporary file, would it have to do ???

 

Thanks!!!

Link to comment
Share on other sites

Okay clarified my doubt !!! But would you have some way to rename or delete this file from the client machine ???

 

You get no access to client files. What if any website could delete your files?

 

Why do you need that? Maybe there is another way.

 

And if I want to save this file from the fileupload to another folder other than temporary file, would it have to do ???

procedure TMainForm.UniFileUpload1Completed(Sender: TObject; AStream: TFileStream);
var
  DestName : string;
  DestFolder : string;
begin
  DestFolder := UniServerModule.StartPath + 'UploadFolder\';
  DestName := DestFolder + ExtractFileName(UniFileUpload1.FileName);
  CopyFile(PChar(AStream.FileName), PChar(DestName), False);
  ShowMessage('File ' + UniFileUpload1.FileName + ' Uploaded to folder ' + DestFolder);
end;
Link to comment
Share on other sites

procedure TMainForm.UniFileUpload1Completed(Sender: TObject; AStream: TFileStream);
var
  DestName : string;
  DestFolder : string;
begin
  DestFolder := UniServerModule.StartPath + 'UploadFolder\';
  DestName := DestFolder + ExtractFileName(UniFileUpload1.FileName);
  CopyFile(PChar(AStream.FileName), PChar(DestName), False);
  ShowMessage('File ' + UniFileUpload1.FileName + ' Uploaded to folder ' + DestFolder);
end;

Thanks!!!!

 

 

 

 

 

You get no access to client files. What if any website could delete your files?

 

Why do you need that? Maybe there is another way.

 

 

 

 

the user will do the reading of a file, and I need to rename or even delete what is not to do the reading of the file again !!! To the know that this file has already been processed !!!

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...