[ 
https://issues.apache.org/jira/browse/NET-712?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

qwerty287 updated NET-712:
--------------------------
    Environment: Android and Manjaro, running in IntelliJ with Gradle and 
OpenJDK 17  (was: In production (where the bug was noticed), FTPClient runs on 
Android, installed was NET with Gradle.

To reproduce, I created a simple file (attached below) in Kotlin which I ran 
using Gradle and IntelliJ's builtin Kotlin compiler and JVM (OpenJDK 17).)

> Image are not uploaded correctly
> --------------------------------
>
>                 Key: NET-712
>                 URL: https://issues.apache.org/jira/browse/NET-712
>             Project: Commons Net
>          Issue Type: Bug
>          Components: FTP
>    Affects Versions: 3.8.0
>         Environment: Android and Manjaro, running in IntelliJ with Gradle and 
> OpenJDK 17
>            Reporter: qwerty287
>            Priority: Major
>         Attachments: FTPImageExample.kt
>
>
> If I try to upload images (tested with PNG and JPEG), the images are not 
> correctly stored on the server. Instead, they are missing one byte. Two 
> examples:
>  # The original file had a size of 35518 bytes, once I transferred it using 
> FTPClient it were 35517 bytes.
>  # The original file had a size of 45010 bytes, once I transferred it using 
> FTPClient it were 45009 bytes.
> Using a PNG breaks the image completely (viewers can't view it), using a JPEG 
> makes the photo still viewable, but the files are different (in size/MD5 
> fingerprint).
> This affects all PNG and JPEG files, but any other file works. They have the 
> same size and MD5 fingerprint.
> Maybe related to https://issues.apache.org/jira/browse/NET-409 which was 
> fixed in 3.0.1, but this occurs on 3.8.0.
>  
> This can be reproduced on Android using FTPClient in an app and on "regular" 
> JVM (for me OpenJDK 17). The Kotlin file I attached provides a simple 
> example, but it doesn't contain something special. I executed it using Gradle 
> (to add NET as dependency) and using IntelliJ's build and run system.



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

Reply via email to