Merge branch 'master' into 'master'
Fix bug in FTP upload See merge request morningstar/apollyon!3
This commit is contained in:
commit
11a2788c9a
@ -6,6 +6,7 @@ import java.io.IOException;
|
||||
import java.io.OutputStream;
|
||||
import java.net.URL;
|
||||
import java.net.URLConnection;
|
||||
import java.net.URLEncoder;
|
||||
|
||||
public class FTPUploadService {
|
||||
private static final String ftpUrl = "ftp://%s:%s@%s/%s;type=i";
|
||||
@ -15,7 +16,7 @@ public class FTPUploadService {
|
||||
String user = Emulator.getConfig().getValue("ftp.user");
|
||||
String pass = Emulator.getConfig().getValue("ftp.password");
|
||||
|
||||
String uploadURL = String.format(ftpUrl, user, pass, host, uploadPath);
|
||||
String uploadURL = String.format(ftpUrl, URLEncoder.encode(user, "UTF-8"), URLEncoder.encode(pass, "UTF-8"), host, uploadPath);
|
||||
|
||||
URL url = new URL(uploadURL);
|
||||
URLConnection conn = url.openConnection();
|
||||
|
Binary file not shown.
Loading…
Reference in New Issue
Block a user