.println("Upload the contents of one or more files and print their SHA digests:");
System.err.println(" upload <file> [file] [file] [...]");
System.exit(1);
}
ContentStorage storage = new MongoContentStorage(Configuration
.getMongo().getDB(Configuration.getProperty("mongo.db")));
for (int i = 1; i < args.length; i++) {
File f = new File(args[i]);
if (f.isFile() && f.canRead()) {
try {
ContentSHA up = storage
.storeContent(new FileInputStream(f));
// TODO: display if chunked or not
System.out.format("- %10d %80s %40s\n", f.length(), f
.getName(), up.getDigest());