IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

API standards et tierces Android Discussion :

Éclaircissement sur Le telechargement de fichier : Server==> Android


Sujet :

API standards et tierces Android

  1. #1
    Futur Membre du Club
    Profil pro
    Inscrit en
    Juillet 2011
    Messages
    10
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juillet 2011
    Messages : 10
    Points : 6
    Points
    6
    Par défaut Éclaircissement sur Le telechargement de fichier : Server==> Android
    Bonjour à tous,

    Au bout de 2 jours de recherche, je me décide à demander votre bon coeur.

    Je suis en train de concevoir une application qui utilise beaucoup de fichiers PDF. Après avoir pensé les incorporer directement dans l'appli, je me dis que non pas une bonne idée.

    Je tente donc depuis deux jours, de télécharger les PDF.
    Le principe est le suivant : j'ai un répertoire sur le device qui accueille les fichier téléchargés.
    Je voudrais, je ne sais pas comment encore soit par la classe Download manager, soit par un client ftp que j'essaie de faire, scanner un répertoire sur un serveur distant genre ovh, et récupérer les pdf de ce répertoire.
    Avec la classe Downloadmanager, je n'arrive qu'à en récupérer un, et problème je ne peux pas me permettre de savoir à l'avance l'URL de mes futurs fichiers (leurs noms).
    Sauf si vous avez une idée de savoir comment faire du téléchargement "dynamique",

    Je me tourne donc vers une solution client ftp qui se connecterais à mon ftp ovh, et récupérerait l'ensemble des fichier pdf d'un répertoire spécifié.
    Mais là je ne sais comment faire, j'ai cherché un peu partout des idées, regarder ce qui se faisait, mais je ne sais pas comment m'y prendre pour lister le répertoire distant et lancer le ftpconnect.

    Je ne sais pas si je suis très clair, j'arrive a peu prés a tout faire mais pas télécharger plusieurs fichiers dont je ne connais pas encore pour certain l'existence future..

    Merci de votre lecture..

    Je.

  2. #2
    Modérateur
    Avatar de grunk
    Homme Profil pro
    Lead dév - Architecte
    Inscrit en
    Août 2003
    Messages
    6 691
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 39
    Localisation : France, Côte d'Or (Bourgogne)

    Informations professionnelles :
    Activité : Lead dév - Architecte
    Secteur : Industrie

    Informations forums :
    Inscription : Août 2003
    Messages : 6 691
    Points : 20 222
    Points
    20 222
    Par défaut
    Si tu veux le faire en FTP , l'idéal est de passer par un client FTP déjà fait , qui va t'éviter pas mal de prise de tête.
    L'un des plus connu est FTPCLient d'apache commons : http://commons.apache.org/proper/commons-net/ un exemple ici : http://commons.apache.org/proper/com...ntExample.java
    Pry Framework php5 | N'oubliez pas de consulter les FAQ Java et les cours et tutoriels Java

  3. #3
    Futur Membre du Club
    Profil pro
    Inscrit en
    Juillet 2011
    Messages
    10
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juillet 2011
    Messages : 10
    Points : 6
    Points
    6
    Par défaut Suite..un avis d'expert..
    Citation Envoyé par grunk Voir le message
    Si tu veux le faire en FTP , l'idéal est de passer par un client FTP déjà fait , qui va t'éviter pas mal de prise de tête.
    L'un des plus connu est FTPCLient d'apache commons : http://commons.apache.org/proper/commons-net/ un exemple ici : http://commons.apache.org/proper/com...ntExample.java
    Bonjour, Merci pour la réponse, mais je me suis lancé dans un truc...
    J'ai repris un code de TheAppGuruz j'essaie de l'adapter...j'y suis presque, mais je bloque sur le Download FTP, je me connecte je liste mon répertoire..et quand je veux lancer le FTP download, rien ne se passe..
    Je vous met le code si jamais...

    MainActivity:
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    184
    185
    186
    187
    188
    189
    190
    191
    192
    193
    194
    195
    196
    197
    198
    199
    200
    201
    202
    203
    204
    205
    206
    207
    208
    209
    210
    211
    212
    213
    214
    215
    216
    217
    218
    219
    220
    221
    222
    223
    224
    225
    226
    227
    228
    229
    230
    231
    232
    233
    234
    235
    236
    237
    238
    239
    240
    241
    242
    243
    244
    245
    246
    247
    248
    249
    250
    251
    252
    253
    254
    255
    256
    257
    258
    259
    260
    261
    262
    263
    264
    265
    266
    267
    268
    269
    270
    271
    272
    273
    274
    275
    276
    277
    278
    279
    280
    281
    282
    283
    284
    285
    286
    287
    288
    289
    290
    291
    292
    293
    294
    295
    296
    297
    298
    299
    300
    301
    302
    303
    304
    305
    306
    307
    308
     
    package com.tagworld.ftptest;
     
    import android.app.Activity;
    import android.app.Dialog;
    import android.app.ProgressDialog;
    import android.content.Context;
    import android.net.ConnectivityManager;
    import android.net.NetworkInfo;
    import android.os.Bundle;
    import android.os.Environment;
    import android.os.Handler;
    import android.util.Log;
    import android.view.View;
    import android.view.View.OnClickListener;
    import android.widget.ArrayAdapter;
    import android.widget.Button;
    import android.widget.EditText;
    import android.widget.ListView;
    import android.widget.TextView;
    import android.widget.Toast;
     
    import java.io.File;
    import java.io.FileWriter;
    import java.io.IOException;
     
    public class MainActivity extends Activity implements OnClickListener {
     
        private static final String TAG = "MainActivity";
        private static final String TEMP_FILENAME = "TAGtest.txt";
        private Context cntx = null;
     
        private MyFTPClientFunctions ftpclient = null;
        //private FTPDownload ftpDownClient=null;
     
        private Button btnLoginFtp, btnUploadFile, btnDisconnect, btnExit;
        private EditText edtHostName;
        private EditText edtUserName;
        private EditText edtPassword;
        private ProgressDialog pd;
     
        private String[] fileList;
     
        private Handler handler = new Handler() {
     
            public void handleMessage(android.os.Message msg) {
     
                if (pd != null && pd.isShowing()) {
                    pd.dismiss();
                }
                if (msg.what == 0) {
                    getFTPFileList();
                } else if (msg.what == 1) {
                    showCustomDialog(fileList);
                } else if (msg.what == 2) {
                    Toast.makeText(MainActivity.this, "Uploaded Successfully!",
                            Toast.LENGTH_LONG).show();
                } else if (msg.what == 3) {
                    Toast.makeText(MainActivity.this, "Disconnected Successfully!",
                            Toast.LENGTH_LONG).show();
                } else if (msg.what == 7) {
                    Toast.makeText(MainActivity.this, "REPERE 1",
                            Toast.LENGTH_LONG).show();
     
                } else {
                    Toast.makeText(MainActivity.this, "Unable to Perform Action!",
                            Toast.LENGTH_LONG).show();
                }
     
            }
     
        };
     
        @Override
        protected void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
            setContentView(R.layout.activity_main);
     
            cntx = this.getBaseContext();
     
            edtHostName = (EditText) findViewById(R.id.edtHostName);
            edtUserName = (EditText) findViewById(R.id.edtUserName);
            edtPassword = (EditText) findViewById(R.id.edtPassword);
     
            btnLoginFtp = (Button) findViewById(R.id.btnLoginFtp);
            btnUploadFile = (Button) findViewById(R.id.btnUploadFile);
            btnDisconnect = (Button) findViewById(R.id.btnDisconnectFtp);
            btnExit = (Button) findViewById(R.id.btnExit);
     
            btnLoginFtp.setOnClickListener(this);
            btnUploadFile.setOnClickListener(this);
            btnDisconnect.setOnClickListener(this);
            btnExit.setOnClickListener(this);
     
            // Create a temporary file. You can use this to upload
            createDummyFile();
     
            ftpclient = new MyFTPClientFunctions();
        }
     
        public void onClick(View v) {
            switch (v.getId()) {
                case R.id.btnLoginFtp:
                    if (isOnline(MainActivity.this)) {
                        connectToFTPAddress();
                      //  DownloadFtp();
                    } else {
                        Toast.makeText(MainActivity.this,
                                "Please check your internet connection!",
                                Toast.LENGTH_LONG).show();
                    }
                    break;
                case R.id.btnUploadFile:
                    pd = ProgressDialog.show(MainActivity.this, "", "Uploading...",
                            true, false);
                    new Thread(new Runnable() {
                        public void run() {
                            boolean status = false;
                            // DEBUT DOWNLOAD
                            status = ftpclient.ftpUpload(
                                    Environment.getExternalStorageDirectory().getAbsolutePath() + "/Download/video" + TEMP_FILENAME,
                                    TEMP_FILENAME, "/", cntx);
     
                            // FIN DOWNLOAD
     
                            if (status == true) {
                                Log.d(TAG, "Upload success");
                                handler.sendEmptyMessage(2);
                            } else {
                                Log.d(TAG, "Upload failed");
                                handler.sendEmptyMessage(-1);
                            }
                        }
                    }).start();
                    break;
                case R.id.btnDisconnectFtp:
                    pd = ProgressDialog.show(MainActivity.this, "", "Disconnecting...",
                            true, false);
     
                    new Thread(new Runnable() {
                        public void run() {
                            ftpclient.ftpDisconnect();
                            handler.sendEmptyMessage(3);
                        }
                    }).start();
     
                    break;
                case R.id.btnExit:
                    this.finish();
                    break;
            }
     
        }
     
        private void connectToFTPAddress() {
     
            final String host = edtHostName.getText().toString().trim();
            final String username = edtUserName.getText().toString().trim();
            final String password = edtPassword.getText().toString().trim();
     
            if (host.length() < 1) {
                Toast.makeText(MainActivity.this, "Please Enter Host Address!",
                        Toast.LENGTH_LONG).show();
            } else if (username.length() < 1) {
                Toast.makeText(MainActivity.this, "Please Enter User Name!",
                        Toast.LENGTH_LONG).show();
            } else if (password.length() < 1) {
                Toast.makeText(MainActivity.this, "Please Enter Password!",
                        Toast.LENGTH_LONG).show();
            } else {
     
                pd = ProgressDialog.show(MainActivity.this, "", "Connecting...",
                        true, false);
                handler.sendEmptyMessage(0);
                new Thread(new Runnable() {
                    public void run() {
                        boolean status = false;
                        status = ftpclient.ftpConnect(host, username, password, 21);
                        if (status == true) {
                            Log.d(TAG, "Connection Success");
                            Toast.makeText(MainActivity.this, "BIEN CONNECTE",
                                    Toast.LENGTH_LONG).show();
     
                            handler.sendEmptyMessage(0);
                        } else {
                            Log.d(TAG, "Connection failed");
                            handler.sendEmptyMessage(-1);
                        }
                    }
                }).start();
            }
        }
     
        private void getFTPFileList() {
            pd = ProgressDialog.show(MainActivity.this, "", "Getting Files...",
                    true, false);
     
            new Thread(new Runnable() {
     
                @Override
                public void run() {
                    fileList = ftpclient.ftpPrintFilesList("/www/monrepertoire");
                    handler.sendEmptyMessage(1);
                }
            }).start();
        }
     
        public void createDummyFile() {
     
            try {
                File root = new File(Environment.getExternalStorageDirectory(),
                        "TAGFtp");
                if (!root.exists()) {
                    root.mkdirs();
                }
                File gpxfile = new File(root, TEMP_FILENAME);
                FileWriter writer = new FileWriter(gpxfile);
                writer.append("Hi this is a sample file to upload for android FTP client example from TheAppGuruz!");
                writer.flush();
                writer.close();
                Toast.makeText(this, "Saved : " + gpxfile.getAbsolutePath(),
                        Toast.LENGTH_LONG).show();
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
     
        private boolean isOnline(Context context) {
            ConnectivityManager cm = (ConnectivityManager) context
                    .getSystemService(Context.CONNECTIVITY_SERVICE);
            NetworkInfo netInfo = cm.getActiveNetworkInfo();
            if (netInfo != null && netInfo.isConnected()) {
                return true;
            }
            return false;
        }
     
        private void showCustomDialog(String[] fileList) {
            // custom dialog
            final Dialog dialog = new Dialog(MainActivity.this);
            dialog.setContentView(R.layout.custom);
            dialog.setTitle("/ Directory File List");
     
            TextView tvHeading = (TextView) dialog.findViewById(R.id.tvListHeading);
            tvHeading.setText(":: File List ::");
     
            if (fileList != null && fileList.length > 0) {
                ListView listView = (ListView) dialog
                        .findViewById(R.id.lstItemList);
                ArrayAdapter<String> fileListAdapter = new ArrayAdapter<String>(
                        this, android.R.layout.simple_list_item_1, fileList);
                listView.setAdapter(fileListAdapter);
     
            } else {
                tvHeading.setText(":: No Files ::");
            }
            //ftpdown();
            Button dialogButton = (Button) dialog.findViewById(R.id.btnOK);
            // if button is clicked, close the custom dialog
            dialogButton.setOnClickListener(new OnClickListener() {
                @Override
                public void onClick(View v) {
                    dialog.dismiss();
                }
            });
     
            dialog.show();
        }
     
        private void DownloadFtp() {
     
            final String  srcFilePath ="MonFTP/www/monrepertoire";
            final String desFilePath = Environment.getExternalStorageDirectory().getAbsolutePath() + "/Download/monrepertoire";
            Toast.makeText(MainActivity.this, desFilePath+"   "+srcFilePath,
                    Toast.LENGTH_LONG).show();
           // pd = ProgressDialog.show(MainActivity.this, "", "Connecting...",
          //          true, false);
         //   handler.sendEmptyMessage(0);
            new Thread(new Runnable() {
                public void run() {
                    boolean status = false;
     
                    status = ftpclient.ftpDownload(srcFilePath, desFilePath);
                    if (status == true) {
                        Log.d(TAG, "Connection Success");
                        Toast.makeText(MainActivity.this, "BIEN CONNECTE",
                                Toast.LENGTH_LONG).show();
     
     
                        handler.sendEmptyMessage(7);
                    } else {
                        Log.d(TAG, "Connection failed");
                        handler.sendEmptyMessage(-1);
                    }
                }
            }).start();
        }
     
        public void doFile(View v) throws IOException {
            Button btnfile = (Button) findViewById(R.id.btnfile);
            if (v.getId() == R.id.btnfile) {
     
                           DownloadFtp();
            }
        }
     
     
    }
    UN Java Class des fonction FTP

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    184
    185
    186
    187
    188
    189
    190
    191
    192
    193
    194
    195
    196
    197
    198
    199
    200
    201
    202
    203
    204
    205
    206
    207
    208
    209
    210
    211
    212
    213
    214
    215
    216
    217
    218
    219
    220
    221
    222
    223
    224
    225
    226
    227
    228
    229
    230
    231
    232
    233
    234
    235
    236
    237
    238
    package com.tagworld.ftptest;
     
    import android.content.Context;
    import android.os.Environment;
    import android.util.Log;
     
    import org.apache.commons.net.ftp.FTP;
    import org.apache.commons.net.ftp.FTPClient;
    import org.apache.commons.net.ftp.FTPFile;
    import org.apache.commons.net.ftp.FTPReply;
     
    import java.io.FileInputStream;
    import java.io.FileOutputStream;
    import java.io.IOException;
    import java.io.OutputStream;
     
    public class MyFTPClientFunctions {
     
    	// Now, declare a public FTP client object.
     
    	private static final String TAG = "MyFTPClientFunctions";
    	public FTPClient mFTPClient = null;
     
    	// Method to connect to FTP server:
    	public boolean ftpConnect(String host, String username, String password,
    			int port) {
    		try {
    			mFTPClient = new FTPClient();
    			// connecting to the host
    			mFTPClient.connect(host, port);
     
    			// now check the reply code, if positive mean connection success
    			if (FTPReply.isPositiveCompletion(mFTPClient.getReplyCode())) {
    				// login using username & password
    				boolean status = mFTPClient.login(username, password);
     
    				/*
    				 * Set File Transfer Mode
    				 * 
    				 * To avoid corruption issue you must specified a correct
    				 * transfer mode, such as ASCII_FILE_TYPE, BINARY_FILE_TYPE,
    				 * EBCDIC_FILE_TYPE .etc. Here, I use BINARY_FILE_TYPE for
    				 * transferring text, image, and compressed files.
    				 */
    				mFTPClient.setFileType(FTP.BINARY_FILE_TYPE);
    				mFTPClient.enterLocalPassiveMode();
     
    				return status;
    			}
    		} catch (Exception e) {
    			Log.d(TAG, "Error: could not connect to host " + host);
    		}
     
    		return false;
    	}
     
    	// Method to disconnect from FTP server:
     
    	public boolean ftpDisconnect() {
    		try {
    			mFTPClient.logout();
    			mFTPClient.disconnect();
    			return true;
    		} catch (Exception e) {
    			Log.d(TAG, "Error occurred while disconnecting from ftp server.");
    		}
     
    		return false;
    	}
     
    	// Method to get current working directory:
     
    	public String ftpGetCurrentWorkingDirectory() {
    		try {
    			String workingDir = mFTPClient.printWorkingDirectory();
    			return workingDir;
    		} catch (Exception e) {
    			Log.d(TAG, "Error: could not get current working directory.");
    		}
     
    		return null;
    	}
     
    	// Method to change working directory:
     
    	public boolean ftpChangeDirectory(String directory_path) {
    		try {
    			mFTPClient.changeWorkingDirectory(directory_path);
    		} catch (Exception e) {
    			Log.d(TAG, "Error: could not change directory to " + directory_path);
    		}
     
    		return false;
    	}
     
    	// Method to list all files in a directory:
     
    	public String[] ftpPrintFilesList(String dir_path) {
    		String[] fileList = null;
    		try {
    			FTPFile[] ftpFiles = mFTPClient.listFiles(dir_path);
    			int length = ftpFiles.length;
    			fileList = new String[length];
    			for (int i = 0; i < length; i++) {
    				String name = ftpFiles[i].getName();
    				boolean isFile = ftpFiles[i].isFile();
     
    				if (isFile) {
    					fileList[i] = "File :: " + name;
    					Log.i(TAG, "File : " + name);
    				} else {
    					fileList[i] = "Directory :: " + name;
    					Log.i(TAG, "Directory : " + name);
    				}
    			}
    			return fileList;
    		} catch (Exception e) {
    			e.printStackTrace();
    			return fileList;
    		}
    	}
     
    	// Method to create new directory:
     
    	public boolean ftpMakeDirectory(String new_dir_path) {
    		try {
    			boolean status = mFTPClient.makeDirectory(new_dir_path);
    			return status;
    		} catch (Exception e) {
    			Log.d(TAG, "Error: could not create new directory named "
    					+ new_dir_path);
    		}
     
    		return false;
    	}
     
    	// Method to delete/remove a directory:
     
    	public boolean ftpRemoveDirectory(String dir_path) {
    		try {
    			boolean status = mFTPClient.removeDirectory(dir_path);
    			return status;
    		} catch (Exception e) {
    			Log.d(TAG, "Error: could not remove directory named " + dir_path);
    		}
     
    		return false;
    	}
     
    	// Method to delete a file:
     
    	public boolean ftpRemoveFile(String filePath) {
    		try {
    			boolean status = mFTPClient.deleteFile(filePath);
    			return status;
    		} catch (Exception e) {
    			e.printStackTrace();
    		}
     
    		return false;
    	}
     
    	// Method to rename a file:
     
    	public boolean ftpRenameFile(String from, String to) {
    		try {
    			boolean status = mFTPClient.rename(from, to);
    			return status;
    		} catch (Exception e) {
    			Log.d(TAG, "Could not rename file: " + from + " to: " + to);
    		}
     
    		return false;
    	}
     
    	// Method to download a file from FTP server:
     
    	/**
             * mFTPClient: FTP client connection object (see FTP connection example)
             * srcFilePath: path to the source file in FTP server desFilePath: path to
             * the destination file to be saved in sdcard
             */
    	public boolean ftpDownload(String srcFilePath, String desFilePath) {
    		boolean status = false;
    		try {
    			FileOutputStream desFileStream = new FileOutputStream(desFilePath);
                status = mFTPClient.retrieveFile(srcFilePath, desFileStream);
    			desFileStream.close();
     
    			return status;
    		} catch (Exception e) {
    			Log.d(TAG, "download failed");
    		}
     
    		return status;
     
     
    	}
     
     
     
     
    	// Method to upload a file to FTP server:
     
    	/**
             * mFTPClient: FTP client connection object (see FTP connection example)
             * srcFilePath: source file path in sdcard desFileName: file name to be
             * stored in FTP server desDirectory: directory path where the file should
             * be upload to
             */
    	public boolean ftpUpload(String srcFilePath, String desFileName,
    			String desDirectory, Context context) {
    		boolean status = false;
    		try {
    			FileInputStream srcFileStream = new FileInputStream(srcFilePath);
     
    			// change working directory to the destination directory
    			// if (ftpChangeDirectory(desDirectory)) {
    			status = mFTPClient.storeFile(desFileName, srcFileStream);
    			// }
     
    			srcFileStream.close();
     
    			return status;
    		} catch (Exception e) {
    			e.printStackTrace();
    			Log.d(TAG, "upload failed: " + e);
    		}
     
    		return status;
    	}
     
     
     
    	}
     
     
    }
    Je pense avoir bien saisi le code, j'ai les droits d’écriture sur le stockage je me connecte correctement à mon FTP, j'arrive a lister mes fichiers dans le répertoire voulu.
    Mais pour les downloader, c'est autre chose....je crois que j'ai un soucis au niveau de :

    private void DownloadFtp()

    A votre bon coeur...je tourne en rond..
    Je suis bien conscient que vous avez du avoir plusieurs fois la demande, mais je bloque vraiment.
    Merci d'avance.

    Je.

  4. #4
    Modérateur
    Avatar de grunk
    Homme Profil pro
    Lead dév - Architecte
    Inscrit en
    Août 2003
    Messages
    6 691
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 39
    Localisation : France, Côte d'Or (Bourgogne)

    Informations professionnelles :
    Activité : Lead dév - Architecte
    Secteur : Industrie

    Informations forums :
    Inscription : Août 2003
    Messages : 6 691
    Points : 20 222
    Points
    20 222
    Par défaut
    Comme ca c'est dur à dire , il faut debugger.
    FAire du pas à pas voir jusqu'où tu arrive et isoler la partie qui pose problème avec les messages d'erreur adéquats. Sans ça je vais pas m'amuser à le tester
    Pry Framework php5 | N'oubliez pas de consulter les FAQ Java et les cours et tutoriels Java

  5. #5
    Futur Membre du Club
    Profil pro
    Inscrit en
    Juillet 2011
    Messages
    10
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juillet 2011
    Messages : 10
    Points : 6
    Points
    6
    Par défaut
    Bonsoir,

    Même en déboguant, je ne m'en sors pas. Je crois que je vais laisser tombé, j'y ai passé la journée sans succes, avec de faux espoir

Discussions similaires

  1. Réponses: 0
    Dernier message: 17/03/2011, 17h20
  2. Réponses: 0
    Dernier message: 19/09/2007, 12h53
  3. Au secours, sur les licences MS SQL Server
    Par papouAlain dans le forum MS SQL Server
    Réponses: 6
    Dernier message: 31/10/2004, 11h27
  4. Un peu de lumière sur l'arborescence des fichiers de Linux
    Par Noki dans le forum Administration système
    Réponses: 6
    Dernier message: 07/04/2004, 16h16
  5. Probleme sur le Fields des fichiers Xmlgram
    Par Sandrine75 dans le forum XMLRAD
    Réponses: 4
    Dernier message: 20/03/2003, 17h09

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo