72
Views
12
Comments
Solved
How to copy image / file in FTP's subfolder
Question
Application Type
Reactive

Hi,

I am using  "FTPSc" Forge Component for uploading images on my FTP Server.  File uploaded successfully but it is outside "httpdocs" folder.I have a folder inside "httpdocs"-> "TEST" I want to copy it inside it. But unfortunately I don't understand how to specify that folder address. I tried some options for it's Host Property. Like,

1] myDomain.com/httpdocs/Test

2] myDomain.com/Test

But it is not working.

Please help me here

Below component I am using.


1.jpg is uploaded file in my FTP Server. [FileZilla View]


Thanks

2024-01-26 16-31-11
Bryan Minton
 
MVP
Solution

No problem! It can be tough getting things working sometimes, with that error make sure that the "Host" input parameter is formatted correctly using either ftp:// or http:// and be sure that all your "/" are in the right places, see the example below.

2024-01-26 16-31-11
Bryan Minton
 
MVP

Hello,

You may want to try a more supported component, the one that I regularly use is the one below.

https://www.outsystems.com/forge/component-overview/59/extension-ftpwebrequest

And to better answer you question are you making sure that when you are trying to get a file from the FTP that you are using the entire filename "Test.jpg" or "1.jpg"?

Let me know if you use the other component as I am more familiar with that one and I may be able to make a demo

-Bryan 

UserImage.jpg
Shaun11

Hello Bryan,

Thanks for reply.

You : And to better answer you question are you making sure that when you are trying to get a file from the FTP that you are using the entire filename "Test.jpg" or "1.jpg"? 

Me:  Yes correct. With Folder Name. And that I want to store it in Entity. 

Please let me know what is best way to implement this.


Thanks

2024-01-26 16-31-11
Bryan Minton
 
MVP

So it looks like the path goes in the filename input, have you tried this?

UserImage.jpg
Shaun11

GetFile for retrieving purpose. I want to store uploaded file in specific address [Test Folder] and accordingly Path I can get generate it. 

For Ex: myDomain.com/Test/1.jpg <- This I'll store in my entity.

But I unable to upload my file in specific location.


Currently I am using only "UploadFile"

2024-01-26 16-31-11
Bryan Minton
 
MVP

When using upload file you can put the path before the file name like the picture below

UserImage.jpg
Shaun11

No not working yet

2024-01-26 16-31-11
Bryan Minton
 
MVP

Okay so my recommendation is to use this component instead https://www.outsystems.com/forge/component-overview/59/extension-ftpwebrequest 

 I was just having too many issues using the "FTPSc" component. I have attached a sample on how to create directories, add files to that directory, in this case /Test, then retrieve that file from the FTP server using that component. Its using a test FTP server so you can just swap in your connection information after you test the functionality. 

Let me know if you need any more help or have questions

FTPTest.oap
UserImage.jpg
Shaun11

I am getting this issue now after using "SendDataCommand" 


I think I am making hard to this problem

2024-01-26 16-31-11
Bryan Minton
 
MVP
Solution

No problem! It can be tough getting things working sometimes, with that error make sure that the "Host" input parameter is formatted correctly using either ftp:// or http:// and be sure that all your "/" are in the right places, see the example below.

UserImage.jpg
Shaun11

 SendDataCommand.StatusDescription returns me above message


UserImage.jpg
Shaun11

Hey, it's working now... :-)

Thanks a lot Bryan for timely help :-)

2024-01-26 16-31-11
Bryan Minton
 
MVP

Great to hear!!! and your very welcome, have a good one!

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.