Pictures are now sent via FTP in binary mode.
This commit is contained in:
parent
0c2a043ca1
commit
96154a06c8
6 changed files with 147 additions and 138 deletions
|
@ -80,7 +80,7 @@ public class LifeBlogger extends Thinlet
|
|||
/**
|
||||
* Creates a new LifeBlogger object.
|
||||
*
|
||||
* @throws IOException DOCUMENT ME!
|
||||
* @throws IOException If an error occurs while creating the object.
|
||||
*/
|
||||
private LifeBlogger()
|
||||
throws IOException
|
||||
|
|
|
@ -38,6 +38,7 @@ package net.thauvin.lifeblogger;
|
|||
|
||||
import org.apache.commons.net.ftp.FTPClient;
|
||||
import org.apache.commons.net.ftp.FTPReply;
|
||||
import org.apache.commons.net.ftp.FTP;
|
||||
|
||||
import java.io.BufferedInputStream;
|
||||
import java.io.File;
|
||||
|
@ -117,6 +118,11 @@ public class LifeFTP extends LifeBlog
|
|||
{
|
||||
final BufferedInputStream bis = new BufferedInputStream(new FileInputStream(getFile()));
|
||||
|
||||
if (!getFilename().endsWith(".txt"))
|
||||
{
|
||||
ftp.setFileTransferMode(FTP.BINARY_FILE_TYPE);
|
||||
}
|
||||
|
||||
ftp.storeFile(getFilename(), bis);
|
||||
|
||||
bis.close();
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* Created by JReleaseInfo AntTask from Open Source Competence Group */
|
||||
/* Creation date Thu Jul 29 10:28:53 PDT 2004 */
|
||||
/* Creation date Thu Aug 26 13:35:50 PDT 2004 */
|
||||
package net.thauvin.lifeblogger;
|
||||
|
||||
import java.util.Date;
|
||||
|
@ -12,21 +12,21 @@ import java.util.Date;
|
|||
public class ReleaseInfo {
|
||||
|
||||
|
||||
/** buildDate (set during build process to 1091122133468L). */
|
||||
private static Date buildDate = new Date(1091122133468L);
|
||||
/** buildDate (set during build process to 1093552550453L). */
|
||||
private static Date buildDate = new Date(1093552550453L);
|
||||
|
||||
/**
|
||||
* Get buildDate (set during build process to Thu Jul 29 10:28:53 PDT 2004).
|
||||
* Get buildDate (set during build process to Thu Aug 26 13:35:50 PDT 2004).
|
||||
* @return Date buildDate
|
||||
*/
|
||||
public static final Date getBuildDate() { return buildDate; }
|
||||
|
||||
|
||||
/**
|
||||
* Get buildNumber (set during build process to 113).
|
||||
* Get buildNumber (set during build process to 118).
|
||||
* @return int buildNumber
|
||||
*/
|
||||
public static final int getBuildNumber() { return 113; }
|
||||
public static final int getBuildNumber() { return 118; }
|
||||
|
||||
|
||||
/** version (set during build process to "0.1.0"). */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue