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

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.

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 

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

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

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"

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

No not working yet

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

I am getting this issue now after using "SendDataCommand" 


I think I am making hard to this problem

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.

 SendDataCommand.StatusDescription returns me above message


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

Thanks a lot Bryan for timely help :-)

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.