The Wayback Machine - https://web.archive.org/web/20200710080930/https://github.com/TryGhost/Ghost/issues/11657
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 import function validate file extension instead of its content #11657

Open
z3niths opened this issue Mar 14, 2020 · 0 comments
Open

Ghost import function validate file extension instead of its content #11657

z3niths opened this issue Mar 14, 2020 · 0 comments

Comments

@z3niths
Copy link

@z3niths z3niths commented Mar 14, 2020

Issue Summary

When we export blog using ghost-cli ghost export, we can name it using any filename and extension. But when we import it into the other ghost server using ghost-cli ghost import, if we use the file which is not a JSON extension (.json) the cli vaidation will thow an error.

Expected

it shouldn't validate using file extension and using JSON (content) validation instead.
So any file name without .json but contain the JSON content should've worked as well.

✖ Running blog import
An error occurred.
Message: 'Response code 415 (Unsupported Media Type)'

To Reproduce

  1. ghost export testimportfile
  2. ghost import testimportfile

Technical details:

Debug Information:
OS: Ubuntu, v18.04.4 LTS
Node Version: v10.19.0
Ghost Version: 3.11.0
Ghost-CLI Version: 1.13.1
Environment: production
Command: 'ghost import bckfile'

@z3niths z3niths changed the title Ghost import function restrict file extension Ghost import function validate file extension instead of its content Mar 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants
You can’t perform that action at this time.