Comments (7)
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...
And if I set $data->encoding = "base64";
in to_blob()
function, it breaks:
from wordpress-github-sync.
I think the only way this would be possible is if there was an API for Git LFS.
from wordpress-github-sync.
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.
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.
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.
i want export wp-uploads to github. because github is my backup.
from wordpress-github-sync.
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)
- Post editing not possible anymore HOT 5
- Document `wpghs_whitelisted_post_types` HOT 6
- Any way to restore content back to Wordpress? HOT 6
- Import from github doesn't update but creates a new page HOT 5
- php error: allowed memory size exhausted HOT 6
- Unable to backup Private Posts? HOT 4
- Permalink url has strange tag HOT 3
- Can't be used in WordPress 4.9.6 HOT 9
- Private Repo? HOT 3
- Can not enable this plugin.
- Auto deletes images
- Class not found? HOT 1
- Export only posts from selected category or sub-categories HOT 1
- Which page on WiKi exactly? HOT 1
- More info
- Semantic linebreaks not working while converting markdown to html HOT 1
- "master" becoming "main" in GitHub causes Not Found error in Github-Sync HOT 3
- No sync
- Documentation on configurations for private repos in organizations (no enterprise) HOT 1
- Export to GitHub not working HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wordpress-github-sync.