Skip to content

Conversation

@Qronicle
Copy link

This pull request adds image syncing (meaning it will transfer the actual image data, and not only the database information.)

This is done by using the 'metainfo' field of a changeset, which contains the source URL, the image data is then received with a normal HTTP request on the moment of pulling.

Because the metainfo field is a VARCHAR with length 255, I noticed issues with too long JSON strings, so I added an update script to convert these to TEXT fields.

Possible side effects: Because of the image being copied at pull-time instead of push-time, the source image might have been removed or updated. Right now the image is only synced when the source is newer or the target image does not exist yet. This means rollbacks to previous images are not possible.

@svenvarkel svenvarkel merged commit b029647 into prototypely:master Apr 27, 2017
@svenvarkel
Copy link
Member

Thanks for contribution!

@Qronicle
Copy link
Author

Hmm, I didn't think you would immediately merge this into master :)
Shouldn't we take the side effects into consideration? I mean maybe there should be an option somewhere when pulling products to sync images as well.

I can imagine that people that sync lots of products don't want to add this extra overhead.

@svenvarkel
Copy link
Member

svenvarkel commented Apr 27, 2017 via email

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

Successfully merging this pull request may close these issues.

2 participants