예제 #1
0
        internal string[] UploadFiles(string[] sourcefiles,bool ShowProgress,bool EncryptFileNames,ref OCL.FTPTransfer FT)
        {
            OCL.Attachments AS = new Attachments();
            try
            {
                FT.ConnectToOysterServer(ServerAddress);
                //FT.ConnectToOysterServer("ome-prototype");
            }
            catch(Exception Err)
            {
                throw new Exception(Err.Message);
            }
            System.IO.FileInfo[] FI = new System.IO.FileInfo[sourcefiles.Length];
            int i = 0;
            foreach(string CFile in sourcefiles)
            {
                FI[i] = new System.IO.FileInfo(CFile);
                i++;
            }
            string[] EncodedFileNames = new string[1];
            try
            {
                EncodedFileNames = FT.UploadFile(FI,ShowProgress,EncryptFileNames);

            }
            catch(Exception Err)
            {
                throw new Exception(Err.Message);
            }
            try
            {
                FT.DisconnectFromOysterServer();
            }
            catch(Exception Err)
            {
                string peekError = Err.Message;
            }

            return EncodedFileNames;
        }