GithubHelp home page GithubHelp logo

Comments (7)

eduardogoncalves avatar eduardogoncalves commented on May 30, 2024 1

Hi, what type of encoding do I have to use in files/images to send them to github? Where can I find about size limit?

I tried to encode image to base64, but at github side only get the string value...
image

And if I set $data->encoding = "base64"; in to_blob() function, it breaks:
image

from wordpress-github-sync.

mAAdhaTTah avatar mAAdhaTTah commented on May 30, 2024

I think the only way this would be possible is if there was an API for Git LFS.

from wordpress-github-sync.

kennyfraser avatar kennyfraser commented on May 30, 2024

I have this partially working, ( git -> wp, but not git <- wp yet ) but am running in to memory limit issues. I added mine type detection to blobs, if the mine type is an image I save the blog contents to disk and side load into the media library.

In a repo with 125 pages and 6 ~100k images I am hitting my 500M php memory limit though. Disabling the in memory cache seems to help, but still working through that issue.

from wordpress-github-sync.

mAAdhaTTah avatar mAAdhaTTah commented on May 30, 2024

Yeah, I suspect there are going to be a lot of issues related to memory and the like, trying to commit and push all your images, which is why I'm not entirely convinced this is even something we should include in the project. I'd be happy to make sure the required hooks are exposed to make this something you could write into a separate plugin, but I don't know as I have the motivation to deal with the headaches that are going to come with trying to support this feature.

from wordpress-github-sync.

kennyfraser avatar kennyfraser commented on May 30, 2024

I agree. Removing the in memory cache seems to have solved the issue for now, but we will be working with images in the repo on a trial basis, potentially removing them later if there are to many issues.

Originally I was trying to develop a separate plugin, but have since ended up heavily modifying this one as well.

I added the concept of "blob processors". Blob processing functions are assigned to blobs based on the blob's mine type and file extension, it is working well so far.

from wordpress-github-sync.

litefeel avatar litefeel commented on May 30, 2024

i want export wp-uploads to github. because github is my backup.

from wordpress-github-sync.

mAAdhaTTah avatar mAAdhaTTah commented on May 30, 2024

If I'm being perfectly honest, I'm not going to implement this feature in WPGHS core. I'm happy to make hooks available, if a plugin would like to extend WPGHS to make this possible, but there's no chance I would use it (since I don't really think it's a good idea), and it sounds like an incredible amount of work to maintain. If anyone on this thread wants to tackle it, feel free to open any issues/PRs in order to expose the hooks you need, but I'm going to close this issue since this isn't a feature the main project will implement.

from wordpress-github-sync.

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.