codeforamerica / clean

Apply for CalFresh in SF
http://demo.cleanassist.org
MIT License
20 stars 7 forks source link

Bulk document uploader #365

Closed lippytak closed 9 years ago

lippytak commented 9 years ago

In addition to filling out the basic application form, users have to upload personal documents to go along with their application. This usually includes about 4-10 scanned documents (PDFs) or photos taken from a phone/tablet. At first we tried a one view per document approach and a circular flow ("do you want to upload anything else?") but a bulk uploader would be a lot better.

Let's try making one:

Resources:

Moved final launch checklist to: https://github.com/codeforamerica/clean/issues/504

daguar commented 9 years ago

If anyone is interested in taking a stab at this, please ping me here first — this might have some complexity in terms of integrating with the larger app, so want to chat about it first.

lippytak commented 9 years ago

We should try out filepicker.io. Just tried it out on Instacart: screen shot 2015-02-28 at 12 17 19 am

Note the 'take a picture' option even on Desktop...huge perk!

S3 instructions: https://developers.filepicker.io/page/s3/

lippytak commented 9 years ago

Filepicker.io support says:

lippytak commented 9 years ago

Moved to current sprint. At the very least let's spec out this feature together this week.

alanjosephwilliams commented 9 years ago

Is a $49 - $99 fixed monthly cost in any way a blocker to this approach?

On Mon, Mar 2, 2015 at 1:47 PM, Jake Solomon notifications@github.com wrote:

Moved to current sprint. At the very least let's spec out this feature together this week.

— Reply to this email directly or view it on GitHub https://github.com/codeforamerica/clean/issues/365#issuecomment-76832960 .

t: @alanjosephwilli p: 817 713 6264

daguar commented 9 years ago

Heroku has 4 options for image processing (one is Filepicker):

screen shot 2015-03-03 at 1 35 55 pm

From https://addons.heroku.com/

lippytak commented 9 years ago

Price isn't a blocker

On Tuesday, March 3, 2015, Dave Guarino notifications@github.com wrote:

Heroku has 4 options for image processing (one is Filepicker):

[image: screen shot 2015-03-03 at 1 35 55 pm] https://cloud.githubusercontent.com/assets/994938/6472891/66c9c88c-c1aa-11e4-9e0b-0f4d59f3911a.png

From https://addons.heroku.com/

— Reply to this email directly or view it on GitHub https://github.com/codeforamerica/clean/issues/365#issuecomment-77040751 .

daguar commented 9 years ago

I'm currently assessing the world of options across UX and technical needs.

daguar commented 9 years ago

So, here's my proposal for what I think we want to use for each of the components:

(In UX, User finalizes application and clicks submit here)

Mr0grog commented 9 years ago

Might recommend shoving the images into redis over PG. You could store the images for each app in a list. But if you want to keep them around, S3 is probably best.

Will try and check out jquery-file-uploader tomorrow if I have time.

lippytak commented 9 years ago

https://support.box.com/hc/en-us/articles/200519718-How-do-I-upload-files-to-a-Box-folder-from-another-website-with-the-Upload-Widget-

Better late than never?

daguar commented 9 years ago

Epic todo checklist

(work being done on the doc-upload-redux branch):

Routing

UI

File processing

insert YAKS / UNDERPANTS GNOMES here

Cleanup

MAYBE:

daguar commented 9 years ago

Added:

daguar commented 9 years ago

Done: Make it automatically upload (no start button)

daguar commented 9 years ago

Added: fix progress bar

daguar commented 9 years ago

Fixed the progress bar in a slightly hacky way — swapped out the jquery-file-upload plugin's progress bar with the simple jquery-ui one: https://jqueryui.com/progressbar/

Experience/design could use some improvement, but the plumbing is there now.

daguar commented 9 years ago

Edited the storage item — let's not use Postgres since Heroku's $50 tier caps at 64gb of storage, and S3 will work fine (even though I don't love schlepping files across HTTP twice.)

daguar commented 9 years ago

Added: - [ ] Secure uploads so that they're not publicly accessible

daguar commented 9 years ago

Finished: Attach unique key (per application) to the documents uploaded

daguar commented 9 years ago

Reorganized under some broad buckets

daguar commented 9 years ago

First pass at processing done

daguar commented 9 years ago

Done with links from prior screens

daguar commented 9 years ago

w00t! done with "Append all document images to the end of the application"

First successful use of it on my local box!

daguar commented 9 years ago

Link for "next step" done (but need to make it a nice button; ugh, css)

daguar commented 9 years ago

Added: Resize images so they're smaller (on a single page)

daguar commented 9 years ago

Done with processing images for PDF appending! The strategy is this:

Tested manually successfully with an iPhone.

alanjosephwilliams commented 9 years ago

woooot

On Thu, Apr 9, 2015 at 10:05 AM, Dave Guarino notifications@github.com wrote:

Done with processing images for PDF appending! The strategy is this:

  • If the doc is a PDF, simply append it
  • If the doc is an image (JPG, PNG, GIF), draw it on its own PDF page (resizing it to fit) and then append that PDF page

Tested manually successfully with an iPhone.

— Reply to this email directly or view it on GitHub https://github.com/codeforamerica/clean/issues/365#issuecomment-91293211 .

t: @alanjosephwilli p: 817 713 6264

daguar commented 9 years ago

Done with:

X - Store the location of the PDF in the database somewhere X - Make case has a Paperclip attachment with the final PDF X - Add has_attached_file to model X - Write a migration X - Try out the interface (what object does it expect?) X - Try it in full flow X - Delete zipping and attachment code X - Modify email body to put link to file

daguar commented 9 years ago

Done with using S3 for doc and PDF storage

daguar commented 9 years ago

Done with securing S3 URLs

daguar commented 9 years ago

Done with basic auth URL to give access to secured application PDFs for EWs

daguar commented 9 years ago

Merged in @alanjosephwilliams's front end work via #484

daguar commented 9 years ago

Successfully used on dev!

Two issues that came out of it (adding above as new tasks):

lippytak commented 9 years ago

Small user pain today = when user had a problem and emailed RMInquiries about it instead of us. Oops! This isn't RM's job so let's do our best to get their email address down from the public asap. Onwards!

lippytak commented 9 years ago

@daguar in the interest of chunkification, what are the remaining steps to launch? Check the QA issue for what I found: https://github.com/codeforamerica/clean/issues/486. LMK if you'd like me to make separate issues for the P1/P2 issues.

daguar commented 9 years ago

Checked off improvement of image quality (was #487)

daguar commented 9 years ago

Moved release checklist to https://github.com/codeforamerica/clean/issues/504