                               # if there is already something in blobstore with longer ttl, we leave it;
                               # infinite ttl = 0 or undefined.
             cb    : required  # cb(err, ttl actually used in seconds); ttl=0 for infinite ttl
-        @db.table('blobs').get(opts.uuid).pluck('expire').run (err, x) =>
+        @table('blobs').get(opts.uuid).pluck('expire').run (err, x) =>
             if err
                 # blob not already saved
-                @db.table('blobs').insert({id:opts.uuid, blob:opts.blob, expire:expire_time(opts.ttl)}).run (err) =>
+                @table('blobs').insert({id:opts.uuid, blob:opts.blob, expire:expire_time(opts.ttl)}).run (err) =>
                     opts.cb(err, opts.ttl)
             else
                 # the blob was already saved

            if not opts.project_id?
                opts.cb("if path is given project_id must also be given")
                return
            @db.table('file_activity').between([opts.project_id, opts.path, cutoff],
                               [opts.project_id, opts.path, new Date()], index:'project_id-path-timestamp').run(opts.cb)
        else if opts.project_id?
            @db.table('file_activity').between([opts.project_id, cutoff],
                               [opts.project_id, new Date()], index:'project_id-timestamp').run(opts.cb)
        else if opts.project_ids?
            ans = []

        opts = defaults opts,
            uuids : required   # uuid=sha1-based from blob
            cb    : required   # cb(err)
        @table('blobs').getAll(opts.uuids...).replace(
            @r.row.without(expire:true)).run(opts.cb)


