Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

/wp-content/uploads/ folder sync #3

Closed
ewsopp opened this issue Jul 29, 2015 · 6 comments
Closed

/wp-content/uploads/ folder sync #3

ewsopp opened this issue Jul 29, 2015 · 6 comments
Assignees
Milestone

Comments

@ewsopp
Copy link
Member

ewsopp commented Jul 29, 2015

I am working with the Vellum theme and I am constantly held back by broken images that are not properly generated via wordpress methods. I spoke with @antonkorotkov about this and he believes this can be resolved if we add functionality to WP-Stateless that keeps the /wp-content/uploads/ folder in sync with GCS.

This would also resolve issues with converting older sites to stateless media and handling images with out-dated thumbnail sizes.

@andypotanin
Copy link
Contributor

This appears on New Wave?

@antonkorotkov
Copy link
Contributor

Yes. I think some of the plugins creates a 'cache' folder in uploads omitting standard way of wp_handle_uploads.

@ewsopp ewsopp added this to the v1.9.0 milestone May 31, 2016
@ewsopp
Copy link
Member Author

ewsopp commented Jun 13, 2016

Issue #27 will handle this in a manual way, but we need something that handles it in an automated way. Is it a bad idea to constantly check for file differences and synchronize any found changes? I'm thinking about how dropbox works...

@antonkorotkov
Copy link
Contributor

I don't think it is even possible on WP plugin level actually. We can only hook when image is created/removed and do something with it.

We could potentially list all physical files and walk over them and check for sync state on some wp-cron job but I don't think it is good approach since once again it should not be done on wp plugin level because it is too time and memory consuming.

So my opinion on here is - it is impossible to do it the way dropbox does. The other way when we hook image create/remove is already implemented under 'On fly' option.

@andypotanin
Copy link
Contributor

@antonkorotkov I don't think this should be on the fly. But this would be a very useful general "Utility" for making sure all your files in uploads are registered as Media library objects, and therefore also on GCS.

So, perhaps this should be a special Tool/Utility you run manually. It'll find all files in uploads directory and create corresponding Media objects for them. While doing so, upload them to GCS.

A cron functionality should be separate, and could be added at a later date.

@ewsopp
Copy link
Member Author

ewsopp commented Jun 14, 2016

@antonkorotkov damn - makes sense. However, to @andypotanin point - I describe how we can handle this manually via issue #27.

I'll close this issue for now, since it was about automating the sync.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants