Upload FTP Images

0

I need to make a function that checks if there is any image in the folder: ("/storage/emulated/0/Pictures/GRP/"); if it needs to send the images via FTP. Would someone have a light to help me? I'm lost at this stage. If necessary, I'll even pay the person who can help me with this part of my Application.

Notes: The photos column is 8.

 private class uploadImagem extends AsyncTask<Integer, Integer, Integer> {
    protected void onPreExecute(){}
    @Override
    protected Integer doInBackground(Integer... arg){
        File fileList = new File("/storage/emulated/0/Pictures/GRP/");
        if(fileList!=null && fileList.isDirectory()){
            File[] files = fileList.listFiles();
            for(int i = 0; i < files.length - 1;i++){
                try {
                    uploadfile(FTP_HOST,FTP_USER,FTP_PASS, controller.getAllData().getString(8), "/public/android/");
                }
                catch (IOException e) {
                    e.printStackTrace();}}}
        return 0;}

    protected void onPostExecute(String result){

    }
}
    
asked by anonymous 12.12.2018 / 20:00

0 answers