2017-11-02 5 views
-1

저는 FTP 초보자이며 파일 전송 중에 문제가 있습니다. FTP 서버로 파일 전송이 진행 중이고 파일이 자동으로 전송되면 파일이 FTP 서버에서 삭제됩니다.FTP 서버에서 파일을 볼 수있게 만드는 방법

   String newfilename; 
       FTPClient ftpClient = new FTPClient(); 
       FileInputStream fis = null; 
       /* 
        written few set of statement for fetching file name and storing filename in **newfilename** variable and storing the file in **fis(FileInputStream).** 
       */ 
       System.out.println("posting file "+newfilename); 
       /* 
        **ftpClient** is entered in working directory, I mean FTP server directory. 
       */ 
       if(newfilename.startsWith("CAP1")) 
       { 
        ftpClient.storeFile(newfilename, fis); 
        record1[0].setAddr1(newfilename); //storing filename in respective column of DB 
       } 
       else if(newfilename.startsWith("CAP2")) 
       { 
        ftpClient.storeFile(newfilename, fis); 
        record1[0].setAddr2(newfilename); //storing filename in respective column of DB 
       } 
       else if(newfilename.startsWith("CAP3")) 
       { 
        ftpClient.storeFile(newfilename, fis); 
        record1[0].setAddr3(newfilename); //storing filename in respective column of DB 
       } 

누구나 내가 이걸로 무엇을해야한다고 생각하니 ??

+1

질문을 이해할 수는 없지만 filezilla와 같은 ftp 클라이언트로 FTP 서버를 사용해 보았습니까? –

+1

업로드가 진행되는 동안 서버에서 파일을 볼 수 있지만 파일이 끝나면 파일이 사라진다는 의미입니까? 내 이해가 정확하다면 어떻게 그걸 정확히 확인합니까? –

+0

예 마틴은 절대적으로 맞습니다. 나는 DB에 저장하는 로그와 데이터를 확인하고있다. – Kamal

답변

0

마지막으로 해결책을 찾았습니다. 주로 FTP 서버가 원격 위치에 있고 한 번 FTP 서버에 이미지를 업로드하면 몇 초 안에 해당 이미지가 일부 FTP 서버 설정으로 인해 다른 위치로 이동합니다. 이러한 이유로 FTP 서버에서 이미지를 볼 수 없습니다.

관련 문제