Topic: MySQL and FTP Image Upload

Hello,

Any one have information how upload images to FTP instead linked inside computer with using MySQL

Please see my project and show me my mistake

I test my ftp access on FTP it's OK

Post's attachments

Attachment icon FTP_File.zip 5.31 kb, 118 downloads since 2022-05-22 

Life is like a school;
One can learn and graduate or stay behind.

Re: MySQL and FTP Image Upload

Hi,


An error in the formation of the path, file name.
You are not submitting anything here.

ftp.Put(link,name+'.jpg'); // Sending a file

Re: MySQL and FTP Image Upload

Hi sparrow

I create a Edit field get the path of file and then copy it by

var
  ftp: TIdFTP;
  link, name: String;

begin
link := Form1.Edit_Link.Text;          // Get File address
name := Form1.Edit_Name.Text;          // Get the name
Life is like a school;
One can learn and graduate or stay behind.

Re: MySQL and FTP Image Upload

The fact that you have created fields
does not mean that you are passing something or passing it correctly. 
You can comment out "try" and see
the result of the error.

Re: MySQL and FTP Image Upload

Hello again

even when I use file path instead scripting still facing same error

ftp.Put('C:\Users\FMR\OneDrive\Pictures\Persons\img.jpg','Photo.jpg');
Life is like a school;
One can learn and graduate or stay behind.

6 (edited by FMR 2022-05-23 08:47:34)

Re: MySQL and FTP Image Upload

Sorry for this topic, I forget applying authentications for FTP

Now it's working

Post's attachments

Attachment icon FTP_Authintications.png 98.82 kb, 61 downloads since 2022-05-23 

Life is like a school;
One can learn and graduate or stay behind.