Exemplo n.º 1
0
        private async void UploadFile()
        {
            ftp.UnlockComponent("test");

            ftp.Hostname = "ftp.bodirectors.com";
            ftp.Username = (App.Current as App).Email + "@bodirectors.com";
            ftp.Password = (App.Current as App).Password;



            await ftp.ConnectAsync();

            isFileAvailable = await ftp.PutFileAsync(file.Path, "OutputNames.xml");

            await ftp.DisconnectAsync();

            isFileAvailable = false;
        }
Exemplo n.º 2
0
        private async Task UploadFile()
        {
            ftp.UnlockComponent("test");

            ftp.Hostname = "ftp.bodirectors.com";
            ftp.Username = (App.Current as App).Email + "@bodirectors.com";
            ftp.Password = (App.Current as App).Password;

            DownloadConnectionStatus.Visibility = Visibility.Collapsed;

            StorageFile file = await Windows.Storage.ApplicationData.Current.LocalFolder.GetFileAsync("SettingsData.xml");

            UploadConnectionStatus.Text = "Uploading Latest File To Server";
            await ftp.ConnectAsync();

            isFileAvailable = await ftp.PutFileAsync(file.Path, "SettingsData.xml");

            await ftp.DisconnectAsync();

            UploadConnectionStatus.Text = "File Uploaded\n\n";
            isFileAvailable             = false;
        }