steiza / docstore

For any civics-minded organization that needs a simple place to host documents publicly
http://a2docs.org/
7 stars 4 forks source link

Compatibility: "view" URL for detail of each uploaded document #13

Closed vielmetti closed 5 years ago

vielmetti commented 8 years ago

Compare http://a2docs.org/doc/382/

Note that there are 4 documents in this document set, and that each of them has a detail page URL, e.g.

http://a2docs.org/doc/382/view/496/ "BlockbyBlock_Ann Arbor DDA - OperatingBudget - 436 hours.xlsx"

While I can think of all kinds of features that might be on this page, the minimum necessary for it is to have a compatible URL so that a deep link to that particular record continues to work.

steiza commented 8 years ago

Ah, interesting. I pretty drastically simplified the sqlite data model, so there isn't currently a concept of document ids anymore.

The new route for downloading a doc is something like /file/<submission id>/<filename>. I could make a legacy mapping so /doc/<submission id>/view/<file id>/ redirects to /file/<submission id>/<filename>.

Do individual files need their own HTML page? Or do you just need a way to create a link to download the file?

eby commented 8 years ago

One of the feature requests on the original was an online PDF or DOC viewer so documents could be viewed without downloading. Having a page per attachment might be beneficial for this type of thing going forward.

But it might just be something like /view/<submission id>/<filename> instead of having specific id's in the database.

steiza commented 8 years ago

This should be fixed by https://github.com/steiza/docstore/commit/7b88f6b0ddc8c749e6a78a9d613f3907f0126b91, but it'll require some additional data to be added to the database. I'll send an email with details.

eby commented 8 years ago

Rolled out the new code and the schema change and appears to work as expected

vielmetti commented 8 years ago

Thanks. I'll look at some of the URLs that are in the wild and make sure that they can be mapped properly so that no links break.

cdzombak commented 5 years ago

@vielmetti / @eby, can this ticket be closed out now?

vielmetti commented 5 years ago

I don't see any reason to keep it open after 3 years of idle; if it re-emerges as an issue we can reopen.