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

Uploading a non-csv file when importing subscribers hangs Ghost #7144

Closed
2 tasks done
kevinansfield opened this issue Jul 25, 2016 · 2 comments · Fixed by TryGhost/Admin#214
Closed
2 tasks done

Uploading a non-csv file when importing subscribers hangs Ghost #7144

kevinansfield opened this issue Jul 25, 2016 · 2 comments · Fixed by TryGhost/Admin#214
Labels
affects:admin Anything relating to Ghost Admin bug [triage] something behaving unexpectedly server / core Issues relating to the server or core of Ghost
Milestone

Comments

@kevinansfield
Copy link
Member

kevinansfield commented Jul 25, 2016

Issue Summary

The file selector is initially set to CSV-only files but it's easy to override (at least it is in OSX). If you select an image and upload that then the ghost service near enough hangs, each subsequent request takes approx 18sec to respond.

Steps to Reproduce

  1. Enable subscribers in Labs if it's not already enabled
  2. Visit the subscribers screen
  3. Click the "Import CSV" button
  4. Click the upload area to trigger the file select dialog
  5. Change the "Format" option from comma-separated-values to All Files (OSX-only, Windows may have something similar?)
  6. Select an image and click "Open"
  7. Upload will finish at which point the ghost service will hang, all subsequent requests take a long time to respond

I think there are two parts to solving this:

Technical details:

  • Ghost Version: master
  • Node Version: 4.4.7
  • Browser/OS: Chrome/OSX
  • Database: sqlite
@kevinansfield kevinansfield added bug [triage] something behaving unexpectedly affects:admin Anything relating to Ghost Admin server / core Issues relating to the server or core of Ghost labels Jul 25, 2016
@twalling
Copy link
Contributor

twalling commented Aug 7, 2016

I have a server PR for this but still have to review a couple things regarding the project's guidelines for submitting them since this is my first one. Wanted to mention it in case anyone was looking to start on this.

ErisDS pushed a commit that referenced this issue Aug 11, 2016
issue #7144
- added a check for file type and file extension
- added an error message to the localization file
- added integration test
chris-brown pushed a commit to chris-brown/Ghost that referenced this issue Aug 14, 2016
issue TryGhost#7144
- added a check for file type and file extension
- added an error message to the localization file
- added integration test
@ErisDS ErisDS added this to the 0.9.1 milestone Aug 16, 2016
kevinansfield added a commit to kevinansfield/Ghost-Admin that referenced this issue Aug 18, 2016
closes TryGhost/Ghost#7144
- allow `gh-file-uploader`'s `accept` attr to be specified
- allows a `validate` action to be passed into `gh-image-uploader` and `gh-file-uploader` components that runs after a file is selected and before the upload starts
- adds a default `validate` action to `gh-image-uploader` and `gh-file-uploader` that triggers the normal `UnsupportedFileType` error when the selected file's mime-type does not match the `accept` attribute
kevinansfield added a commit to kevinansfield/Ghost-Admin that referenced this issue Aug 18, 2016
closes TryGhost/Ghost#7144
- allow the `accept` attr of `gh-file-uploader` and `gh-image-uploader` to be specified
- allows a `validate` action to be passed into `gh-image-uploader` and `gh-file-uploader` components that runs after a file is selected and before the upload starts
- adds a default `validate` action to `gh-image-uploader` and `gh-file-uploader` that triggers the normal `UnsupportedFileType` error when the selected file's mime-type does not match the `accept` attribute
kevinansfield added a commit to kevinansfield/Ghost-Admin that referenced this issue Aug 18, 2016
closes TryGhost/Ghost#7144
- allow the `accept` attr of `gh-file-uploader` and `gh-image-uploader` to be specified
- allows a `validate` action to be passed into `gh-image-uploader` and `gh-file-uploader` components that runs after a file is selected and before the upload starts
- adds a default `validate` action to `gh-image-uploader` and `gh-file-uploader` that triggers the normal `UnsupportedFileType` error when the selected file's mime-type does not match the `accept` attribute
kevinansfield added a commit to kevinansfield/Ghost-Admin that referenced this issue Aug 18, 2016
closes TryGhost/Ghost#7144
- allow the `accept` attr of `gh-file-uploader` and `gh-image-uploader` to be specified
- allows a `validate` action to be passed into `gh-image-uploader` and `gh-file-uploader` components that runs after a file is selected and before the upload starts
- adds a default `validate` action to `gh-image-uploader` and `gh-file-uploader` that triggers the normal `UnsupportedFileType` error when the selected file's mime-type does not match the `accept` attribute
kevinansfield added a commit to kevinansfield/Ghost-Admin that referenced this issue Aug 22, 2016
closes TryGhost/Ghost#7144
- allow the `accept` attr of `gh-file-uploader` and `gh-image-uploader` to be specified
- allows a `validate` action to be passed into `gh-image-uploader` and `gh-file-uploader` components that runs after a file is selected and before the upload starts
- adds a default `validate` action to `gh-image-uploader` and `gh-file-uploader` that triggers the normal `UnsupportedFileType` error when the selected file's mime-type does not match the `accept` attribute
- adds mime type validation to labs importer (basic implementation, should be replaced with uploader components once they have been refactored)
acburdine pushed a commit to TryGhost/Admin that referenced this issue Aug 22, 2016
…214)

closes TryGhost/Ghost#7144
- allow the `accept` attr of `gh-file-uploader` and `gh-image-uploader` to be specified
- allows a `validate` action to be passed into `gh-image-uploader` and `gh-file-uploader` components that runs after a file is selected and before the upload starts
- adds a default `validate` action to `gh-image-uploader` and `gh-file-uploader` that triggers the normal `UnsupportedFileType` error when the selected file's mime-type does not match the `accept` attribute
- adds mime type validation to labs importer (basic implementation, should be replaced with uploader components once they have been refactored)
@kirrg001
Copy link
Contributor

🎉

mixonic pushed a commit to mixonic/Ghost that referenced this issue Oct 28, 2016
issue TryGhost#7144
- added a check for file type and file extension
- added an error message to the localization file
- added integration test
geekhuyang pushed a commit to geekhuyang/Ghost that referenced this issue Nov 20, 2016
issue TryGhost#7144
- added a check for file type and file extension
- added an error message to the localization file
- added integration test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects:admin Anything relating to Ghost Admin bug [triage] something behaving unexpectedly server / core Issues relating to the server or core of Ghost
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants