Giving Permission To A Ftp FILE Java
i have a class in android that connect with the ftp, and store an image, that works perfect the problem is when i am trying to move the image to another directory( i use a php page
Solution 1:
See the FTPClient and FTPFile API You can do something like that :
...
ftpClient.storeFile(url[1]+".jpg", buffIn);
FTPFile file = ftpClient.mlistFile(url[1]+".jpg");
file.setPermission(FTPFile.USER_ACCESS, FTPFile.READ_PERMISSION, true);
file.setPermission(FTPFile.USER_ACCESS, FTPFile.WRITE_PERMISSION, true);
...
Solution 2:
I made it by command
ftpClient.storeFile(url[1]+".jpg", buffIn);
boolean a = ftpClient.sendSiteCommand("chmod " + "777 " + "/absolutepath/"+url[1]+".jpg");
Post a Comment for "Giving Permission To A Ftp FILE Java"