Uploading documents and browsing the ones you can reach
An ordinary member's upload page takes one or more files at once, accepts
them dropped onto the page as readily as chosen with a picker, and files
them into a compartment picked from a pulldown. The pulldown matters more
than it looks: it is built from the compartments that person may actually
write to, so the page cannot offer somewhere the upload would refuse, and
there is no free-text box left for typing an id into. Alongside it is the
list of documents that person can reach, and it says what the vault knows
about each one: its version number, the summary the vault wrote after
reading it, the metadata found inside it, when it was uploaded and how big
it is. It once said only what a document was and never what it said, and
that turned out to hide the very thing a person needs in order to trust an
upload — whether the vault actually read the document at all. What it still
never carries is a passage of the document itself. It also says whether the
file can still be taken back out exactly as it was uploaded, because a
version stored before the vault began keeping originals cannot be
downloaded and the page must say so rather than offer a button that would
fail. Anything the vault does not know is reported as unknown rather than
as a zero or a default it would be inventing.
A listing says what the vault knows about a document
- Given a document version the vault can list
- When the vault builds the listing entry for it
- Then the entry carries its title, its date and its size
- And the entry carries the summary, the version number and the named metadata
- And the entry still carries no passage of the document
A document the vault could not read is listed without a summary
- Given a document version the vault could not summarise
- When the vault builds the listing entry for it
- Then the entry reports no summary at all, rather than an invented one
A document whose size was never recorded reports no size
- Given a document version stored before the vault recorded sizes
- When the vault builds the listing entry for it
- Then the entry reports no size at all, rather than a size of zero
A listing says whether the file itself can still be taken back out
- Given a document version the vault can list
- When the vault builds the listing entry for it
- Then the entry says the original file is still there to download
A document stored before the vault kept originals says so
- Given a document version stored before the vault kept the uploaded file
- When the vault builds the listing entry for it
- Then the entry says there is no original to download, rather than offering one
The pulldown offers exactly the compartments a person may write tostack
- Given a running vault with a member who may write to one compartment and only read another
- When the upload page asks which compartments to offer
- Then it is offered the compartment they may write to
- And it is not offered the one they may only read
An account belonging to nowhere is offered nowhere to filestack
- Given a running vault with an administrator who belongs to no compartment
- When the upload page asks which compartments to offer
- Then it is offered nothing at all
The document list shows what a person can reach and nothing elsestack
- Given a running vault with a member and a document beyond their reach
- When that member lists their documents
- Then they see their own document with its title, date and size
- And the document beyond their reach is absent