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

S3Bucket Import needs Status #3

Closed
benwbrum opened this issue Oct 25, 2012 · 1 comment
Closed

S3Bucket Import needs Status #3

benwbrum opened this issue Oct 25, 2012 · 1 comment
Assignees

Comments

@benwbrum
Copy link
Member

Currently importing an S3 bucket fires off a background task which exports files and then creates an ImageUpload. This works great, but the user experience is that they see an "Importing" message, then wait an hour, then see the new thing appear under uploads.

Here's what I'd like to see happen:
The user is directed to the ImageUpload list and sees their new bucket in a "uploading" state.
If they click on the upload they see a count of the files to be exported and the files currently exported.
Once the export finishes, the ImageUpload status changes and they see the regular image upload screen.

Here's how I'd do it:

On export start:

  • Create new ImageUpload record with
    • a new attribute for the number of files expected (to be pulled from the S3Bucket::ls
      results -- it'd be fine to store the ls contents in an array instead, though)
    • a status of "Importing"
  • Launch the export

During the export, when the admin clicks on an ImageUpload in the 'Importing' status, either redirect to a new view/page or conditionally render a page displaying the normal ImageUpload attributes but also including

  • The total count of files to be exported, as recorded above, and
  • The count of files already exported, as generated by listing the current contents of the export directory
    (It would be fine if this included filenames and sizes exported already)

On export completion

  1. Mark the ImageUpload status as 'New'
@ghost ghost assigned diegoviola Oct 29, 2012
@diegoviola
Copy link
Contributor

Done.

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

No branches or pull requests

2 participants