Giter VIP home page Giter VIP logo

Comments (16)

tvaughan avatar tvaughan commented on July 22, 2024

Another good find! I'll have a look. Thanks.

from middleman-deploy.

paulmsmith avatar paulmsmith commented on July 22, 2024

As an update I think it might be that rsync in not setting the permissions correctly. You need to send a CHMOD argument to rsync so that it specifically sets the file permissions to 644?

from middleman-deploy.

tvaughan avatar tvaughan commented on July 22, 2024

I'm looking into the FTP problem now, but I don't understand this rsync problem. I don't see that behavior. Perhaps you could submit a new issue with some more detail about the rsync problem? Thanks.

from middleman-deploy.

tvaughan avatar tvaughan commented on July 22, 2024

The problem doesn't seem to be due to size:

-rw-rw-r-- 1 tvaughan tvaughan   953 Apr 22 22:15 background.png
-rw-rw-r-- 1 tvaughan tvaughan   139 Apr 22 22:15 small.png

The problem seems to be with the PNG. Although I don't yet know why.

$ irb
irb(main):001:0> require "ptools"
=> true
irb(main):002:0> File.binary?("background.png")
=> false
irb(main):003:0> File.binary?("small.png")
=> true

I made small.png using:

convert background.png small.png

Still looking...

from middleman-deploy.

tvaughan avatar tvaughan commented on July 22, 2024

https://github.com/djberg96/ptools/blob/master/lib/ptools.rb#L90

There are too few characters outside of the range of 32 - 127 for this to be considered binary. Could you do what I did and convert the PNG?

As for a better long-term solution I'm not sure what to do. I could use the mimetype to check if the file is binary or not but that won't be completely accurate either. I could just always FTP in binary mode but that's sure to break in some way too. Ideas?

from middleman-deploy.

asnoba avatar asnoba commented on July 22, 2024

Thanks for a great add-on to Middleman!

I have this issue as well when deploying via FTP. Also – is there a way to only copy changed files over instead of all of them?

from middleman-deploy.

tvaughan avatar tvaughan commented on July 22, 2024

@asnoba Is your problem with a PNG? Can you convert the PNG like I did above? I'm not sure on the best long-term solution. It seems to me that each possible solution causes new problems. Thoughts?

RE: FTP should only upload changed files, see #37

from middleman-deploy.

asnoba avatar asnoba commented on July 22, 2024

Yes. And only with small PNG's as far as I can tell.

from middleman-deploy.

tvaughan avatar tvaughan commented on July 22, 2024

@asnoba Is the workaround I mentioned above an option for you? Any thoughts on a proper long-term solution? Thanks.

from middleman-deploy.

asnoba avatar asnoba commented on July 22, 2024

I'm sorry @tvaughan, but this issue is a bit too technical for me :)

from middleman-deploy.

jtwalters avatar jtwalters commented on July 22, 2024

Since this issue involves small image files being detected incorrectly as non-binary, you could use the FastImage ruby gem on each file being uploaded. It returns nil if it's not an image, or the type of image otherwise.

from middleman-deploy.

paulmsmith avatar paulmsmith commented on July 22, 2024

@tvaughan is @jtwalters suggestion good? Would love to use FTP as some instances of Middleman I'm using do not have their own SSH access for deployment via rsync. Thanks for all the hard work.

from middleman-deploy.

tvaughan avatar tvaughan commented on July 22, 2024

@tvaughan is @jtwalters suggestion good? Would love to use FTP as some instances of Middleman I'm using do not have their own SSH access for deployment via rsync. Thanks for all the hard work.

Looks good to me. If someone wants to submit a pull request, I'll
accept it. Thanks.

-Tom

from middleman-deploy.

noniq avatar noniq commented on July 22, 2024

I could just always FTP in binary mode but that's sure to break in some way too.

I don’t think it would be a problem to use binary transfer mode for all files. All the other methods (Git, SFTP, rsync) only support “binary” transfer anyway. So why should it cause problems for FTP?

from middleman-deploy.

tvaughan avatar tvaughan commented on July 22, 2024

Fixed by #57

from middleman-deploy.

paulmsmith avatar paulmsmith commented on July 22, 2024

Ace! Thanks @tvaughan @crtvhd :)

from middleman-deploy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.