perkeep/server/camlistored
mpl 71090f7c80 pkg/server: add files "zipper" to DownloadHandler
We want to add a feature for clients (the web UI), where they can select
a bunch of files and ask the server for a zip archive of all these files.

This CL modifies the DownloadHandler so it does exactly that upon
reception of a POST request with a query parameter of the form
files=sha1-foo,sha1-bar,sha1-baz

This CL also adds a new button to the contextual sidebar of the web UI,
that takes care of sending the download request to the server.

known limitations: only permanodes with file as camliContent are
accepted as a valid selection (i.e. no sets, or static-dirs, etc) for
now.

Implementation detail:
We're creating an ephemeral DOM form on the fly to send the request.
The reason is: if we sent it as a Go http request, we'd have to read
the response manually and then we'd have no way of writing it to disk.
If we did it with an xhr, we could write the response to disk by
creating a File or Blob and then using URL.createObjectURL(), but we'd
have to keep the response in memory while doing so, which is
unacceptable for large enough archives.

Fixes #899

Change-Id: I104f7c5bd10ab3369e28d33752380dd12b5b3e6b
2017-03-17 00:59:19 +01:00
..
ui pkg/server: add files "zipper" to DownloadHandler 2017-03-17 00:59:19 +01:00
.gitignore Update from r60 to [almost] Go 1. 2012-02-18 21:53:06 -08:00
README Rearrange the server directory a bit, and update some READMEs 2013-02-02 08:56:57 -08:00
camlistored.go camlistored: do not use syslog on windows 2017-02-08 02:16:21 +01:00
camlistored_unix.go camlistored: do not use syslog on windows 2017-02-08 02:16:21 +01:00
run_test.go camlistored, serverinit: allow server config from URLs. 2014-08-02 16:53:58 -07:00

README

This is the main Camlistore server.

See also:
 - The storage interface is in <root>/pkg/blobserver
 - The storage implementations are under that e.g. <root>/pkg/blobserver/localdisk
 - The HTTP handlers are implemented in <root>/pkg/blobserver/handlers
 - The UI code is in <root>/server/camlistored/ui