-
Notifications
You must be signed in to change notification settings - Fork 4
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
Handle Zipped Document Bundles Properly — Funded #117
Comments
Comment by mlissner I can say with pretty high certainty that we aren't going to support zips. There's a lot of complexity to them and I just don't expect to be able to sort it out. What we could do is something that discourages people from using zips. That might be an option, so I'll leave this open. If anybody has ideas for ways of doing something like that, I'm all ears. |
A simple solution here would be to inject some kind of warning about the zip files either before the user clicks the link or after they do (as a modal, say). Another user just got bit by this. |
Depending on the format of the zip files, the new RECAP server could probably handle this. I suggest handling this by:
|
This is kind of chasing our tail. "Everybody" knows that ZIP files don't work, so people who care about RECAP don't use them. There are cases where I would download ZIPs, but I don't. (Or cases where I am willing to forgo RECAP for reasons of urgency.) The better question would be to try to bound how often a ZIP download would be useful to the user. For me, that would be the time at which I am downloading all attachments to a single document, with increasing utility with a greater number of attachments. Zip isn't very important when there are 1 or 2 attachments, but it's super-helpful when there are 30. For instance, http://ia600805.us.archive.org/19/items/gov.uscourts.mad.191926/gov.uscourts.mad.191926.docket.html has 66 attachments to doc 1. (I can't give you the CL docket now because the CL search seems to be down.) |
The good news is that the zip file is blissfully simple: Really, we could probably just start collecting these. The processing, unless I'm missing something, is a piece of cake:
Really it's just parsing file names (easy) and opening a zip (easy, but I forget how). This is about as easy as it comes. Forget tracking. |
Just got another email from a user bit by this. |
Happy to share this feature got sponsored by a user that was annoyed by it. Looks like we'll be building it out! First steps:
After that:
|
BACKGROUND ~~~~~~~~~~ This is a step in the direction of nuking importInstance and exportInstance, and towards doing things the "normal" way, via message passing and listening. As mentioned in freelawproject/recap#237, the way we're doing this now makes it difficult to use certain functions, because those functions can only be used in background scripts that are not *also* content scripts. Since I need one of those functions to support zip upload in freelawproject/recap#117, I'm working to get this fixed. The only alternative to this that I could think of was to create a new file called recap_background.js, which would be a background-only script and then put my code in there, but I didn't love that approach since it separated things arbitrarily. IMPLEMENTATION ~~~~~~~~~~~~~~ The way I've implemented this is to move the uploadDocument function out of Recap(), and to put it under a listener at the bottom of the file. This listener checks for a package name of "recap", and then uses an if statement to listen for a function mame of "uploadDocument". The idea here is that I will move *all* of the existing functions in the Recap() object into this listener, and it will use the package check and function name check to run the right code. I've done a bit of research on this approach, and it appears that there's no right way to do this. This approach feels fairly clean to me though, so I think I'm comfortable going with it. Other approaches I considered were: - Using one listener per function. I like how this would allow us to have a cleaner separation of the functions (they're not just separated by if statements, but I didn't like how this would mean a lot of repetition of the package/function filtering within the beginning of each listener. - Using a simpler approach to function/package filtering. Could the function name just be "recap.uploadDocument" for example instead of using to keys in the object that we pass to the listener? - A few other things that aren't coming to mind right now (it's late). BIG QUESTIONS ~~~~~~~~~~~~~ 1. Can I refactor all of the functions to this format without breaking things? This is a big refactor, and thus dangerous. Going to need test coverage. 2. Is there a way we can simplify sendMessage? We went from 4 lines and one function call to 12 lines and one function call. That's not great. 3. What about tests? How do we pull this apart so that it's easy to also refactor the tests. This seems painful.
Another todo:
|
Fixed in freelawproject/recap-chrome#113 |
Issue by thinkcomp
Wednesday May 08, 2013 at 07:55 GMT
Originally opened as https://github.com/freelawproject/recap-firefox/issues/10
I just downloaded a bunch of documents for a case I filed (CAND). The PDFs got uploaded through RECAP without a problem, but the .zip bundles didn't make it. Specifically, for...
http://ia601700.us.archive.org/20/items/gov.uscourts.cand.265908
...I downloaded documents (2) containing 2-main.pdf and 2-1.pdf, (6) containing 6-main.pdf and 6-1.pdf, and (8) containing 8-main.pdf and 8-1.pdf.
The text was updated successfully, but these errors were encountered: