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

Ghost Importer: Handle updating image paths in the data #4609

Closed
ErisDS opened this issue Dec 9, 2014 · 1 comment
Closed

Ghost Importer: Handle updating image paths in the data #4609

ErisDS opened this issue Dec 9, 2014 · 1 comment
Assignees
Labels
import / upgrade life-cycle stuff: Importing, exporting, upgrading and migrating
Milestone

Comments

@ErisDS
Copy link
Member

ErisDS commented Dec 9, 2014

This is part of the epic #4605


In the case that both images and data are being imported at the same time, we need to make sure that the paths to the images we end up importing correctly match up with what is in the posts.

This means for each post that gets imported, we want to check the content of the post for matching filenames, strip out any absolute path, and update the relative path to include /content/images/ etc if it doesn't already.

Once #4608 is completed, the importer should get a bunch of data back from the image import to use to make these updates to the posts.

@ErisDS ErisDS added the import / upgrade life-cycle stuff: Importing, exporting, upgrading and migrating label Dec 9, 2014
@ErisDS ErisDS added this to the Next Backlog milestone Dec 9, 2014
ErisDS added a commit to ErisDS/Ghost that referenced this issue Dec 12, 2014
closes TryGhost#4608, TryGhost#4609

- image handler loads in any image files & figures out where they'll get
  stored
- image importer has a preprocessor which replaces image paths in
  pertinent spots of post, tag and user models
- image importer stores images, keeping the path where it makes sense
@ErisDS ErisDS self-assigned this Dec 15, 2014
ErisDS added a commit to ErisDS/Ghost that referenced this issue Dec 21, 2014
closes TryGhost#4608, TryGhost#4609

- image handler loads in any image files & figures out where they'll get stored
- image importer has a preprocessor which replaces image paths in
  pertinent spots of post, tag and user models
- image importer stores images, keeping the path where it makes sense
- basic test for the preprocessor
@jaswilli
Copy link
Contributor

Closed via #4690.

ErisDS added a commit to ErisDS/Ghost that referenced this issue Jan 2, 2015
ref TryGhost#4608, TryGhost#4609, TryGhost#4690

- fix errors with cleaning up files
- improve handling of base directories, and introduce a simple valid format for zips (must contain importable files or folders, and may contain up to one base directory)
- vastly improve test coverage
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
import / upgrade life-cycle stuff: Importing, exporting, upgrading and migrating
Projects
None yet
Development

No branches or pull requests

2 participants