I want to upload a file on ftp and i am able to do so with help of apple sample Code https://developer.apple.com/library/ios/samplecode/SimpleFTPSample/Listings/Read_Me_About_SimpleFTPSample_txt.html#//apple_ref/doc/uid/DTS40009243-Read_Me_About_SimpleFTPSample_txt-DontLinkElementID_16
but the problem is while uploading the file if the directories not available on ftp server it should create it automatically.
For Example:
if my address is
192.168.1.100/fileTest/firstDirectory/secondDirectory/myfile.txt
My question is the code should check if fileTest/firstDirectory/secondDirectory/ this path exist or not. If not instead of giving me the stream error it should create the directories and upload my file.
Is this Possible. Any Ideas.. ? Any help will be appreciated.
Thank You in advance.
Related
I want to use RoxyFileMan to manage uploaded images and files. But I should save them on the server. As you know, RoxyFileMan Upload uploads files and images in a folder named Uploads in a fileman directory. We can change FILES_ROOT to another local path to change the directory files get uploaded to.
But, I want to upload files on the server and then read them from the server after they've been uploaded so that they can be edited in ckeditor.
Can anyone please provide advice/guidance on how to achive this outcome?
It's not very clear how your question is meant, but if I understand you correctly, you are using RoxyFileMan on a local server and want to upload files to a remote online server, right?
Roxy uploads files to a directory on the server it is run from. Which means if run from localhost, it will use directory on your localhost. If run from a server, it will use a directory on server.
As far as my knowledge goes, you cannot upload from a localhost to an online server directly.
You could maybe achieve that using some custom script to open an FTP connection, but then you would have to also remake all the code to also load images from there... which would be rather silly.
I'm trying to upload a folder to a ftp server using Overbyte Ics Ftp component.
From what I understand there is no built in function to upload a folder containing files and sub-folders to a ftp so I have to create a recursion in order to upload them all into one call.
What is the correct approach to this problem?
I'm thinking about doing this:
scan the local folder that I want to upload and separate folders from files
for each folder name check if exists on the ftp. If not exists the create it
after creating all folders to the ftp server check if local file exists on the ftp. If not exists start uploading the file to the created directory.
Is this the proper way to do it?
Is there an easier approach to this task?
Thank you!
I have huge json request from server which took a lot of time , therefore I decided to save it in a text file in the same folder of project . But I do not know how can I read it. Can someone help me in this matter?
Thank you
I am very new in c++ and I need to implement an import interface which is going to connect to FTP, read the files from a specific directory and process the files...making some updates in the database and create log file on FTP. I succeeded to connect on FTP and create a directory there, by ftpClient->MKDir("test"), but I don;t know how I can open a directory read the files, opening the files and process the content of the files.
Could someone, please help me?
Thank you in advance!
C++Builder ships with Indy, which has a TIdFTP client component. Simply have it Connect() to the desired FTP server, ChangeDir() to the desired folder if needed, List() the current files if needed, Get() the desired file(s) to your local machine, process and modify them as needed, and then Put() them back into the remote folder.
I have been searching for WebDav library and found this, ACConnect WebDav Project on github
I am able to upload and download image/files. I have not been able to figure out how to upload a folder. If anybody has any ideas please share :)
Ok so found out that we cannot upload the complete folder directly using this library.
There is function [propReq createCollection:filePath]; which enables us to create folder on webdav server. Then we will need to upload files one by one to this newly created folder. In terms achieving uploading of complete folder :)