Cloudinary CLI fails to sync files with certain names (double extension)

Comments

5 comments

  • Avatar
    Erwin Lukas

    Hi,

    Unfortunately, I'm unable to reproduce the scenario you described.

    Can you please share the command you pass to sync? If you can also share your cloud name, we can also try to take a look what happened.

    Regards,
    Erwin Lukas

    0
    Comment actions Permalink
  • Avatar
    nexgeon GmbH

    Cloud name is: focloud

    Command I run is (tried with -F flag too): 

    ```

    $ cld sync --pull MaennerOutfits.ch MaennerOutfits.ch
    Found 0 items in local folder 'MaennerOutfits.ch'

    Downloaded '1529490197_7.jpg' to '/data/backup/MaennerOutfits.ch/1529490197_7.jpg.jpg'
    Downloaded '10011902_1547127322test.png' to '/data/backup/MaennerOutfits.ch/10011902_1547127322test.png.jpg'
    Downloaded '23062009_1592895816AlltagsOutfit.png' to '/data/backup/MaennerOutfits.ch/23062009_1592895816AlltagsOutfit.png.png'
    Downloaded '15011911_1547548476JACKandJONES.png' to '/data/backup/MaennerOutfits.ch/15011911_1547548476JACKandJONES.png.jpg'

    .....

    ```

    This folder contains 5791 items (as seen in Cloudinary dashboard). And when I check local folder with downloaded images, that seems ok:

    ```

    $ ls /data/backup/MaennerOutfits.ch/ | wc -l
    5791

    ```

     

    However, when I check the size of this folder I get:

    ```
    $ du -sh MaennerOutfits.ch/
    392K MaennerOutfits.ch/

    ```

    Further inspection shows that in this folder there are no files larger than 1 byte

    ```

    find MaennerOutfits.ch/ -type f -size +1c

    ```

    Simple `ls -lah` confirms that:

    ```

    -rw-r--r-- 1 blade blade 0 Sep 12 14:45 31121906_1577769565NaketanoPullover.png.jpg

    ```

     

    I've tried uploading new images in this folder, without `.jpg.png` or `.png.png` ext, and this image  gets downloaded correctly. That's how I concluded that this naming convention, which was done by mistake earlier in cms, was the problem. Images are OK in cloudinary folder, we got CDN links and everything works fine.. Just cli tool seems unable to download them :/

    0
    Comment actions Permalink
  • Avatar
    nexgeon GmbH

    Hi Erwin, have you checked the cloud dir? What could be a problem?

    What other options do I have to sync those directories? 

    0
    Comment actions Permalink
  • Avatar
    Erwin Lukas

    Hi,

    I apologize I missed your previous message and thank you for providing detail information.
    Let me take a look your account and see if there is anything that could be causing the issue you described.

    Regards,
    Erwin Lukas

    0
    Comment actions Permalink
  • Avatar
    Erwin Lukas

    Hi,

    Yes, there is appears to be a bug if the public id contains file extension as well.  It tries to download the image with public id without the file extension.

    Let me share this internally. In the mean time, if it's possible, remove the double extension. For resource_type image, the public id should not need to have the file extension.

    Regards,
    Erwin Lukas

    0
    Comment actions Permalink

Please sign in to leave a comment.