MongoFileStore

works.iterative.core.service.impl.MongoFileStore
See theMongoFileStore companion object
class MongoFileStore(collection: MongoCollection[BsonDocument], bucket: GridFSBucket, authenticationService: AuthenticationService) extends FileStoreWriter, FileStoreLoader

Attributes

Companion
object
Graph
Supertypes
trait FileStoreLoader
trait FileStoreWriter
class Object
trait Matchable
class Any

Members list

Type members

Inherited types

type Op[A] = UIO[A]

Attributes

Inherited from:
FileStoreLoader

Value members

Concrete methods

def digestFiles: UIO[Long]
def filterToQuery(f: Filter): Bson
def load(url: String): UIO[Option[Array[Byte]]]
def loadRef(url: String): UIO[Option[FileRef]]
def loadStream(url: String): UIO[ZStream[Any, Throwable, Byte]]
def removeByUrl(url: String): UIO[Unit]
override def store(name: String, file: Array[Byte], metadata: Metadata): UIO[FileRef]

Stores file, or reuses a stored file with the same SHA-256 digest and the same uploader.

Stores file, or reuses a stored file with the same SHA-256 digest and the same uploader.

The uploader is the UploadedBy value after withUploader: the current user when there is one, else the value in metadata. A stored file is reused only when its UploadedBy equals that uploader, where "no uploader" equals only "no uploader". Bytes another uploader stored therefore give a new file stamped with this call's uploader.

Attributes

Definition Classes
FileStoreWriter
override def store(name: String, content: ZStream[Any, Throwable, Byte], metadata: Metadata): UIO[FileRef]

Attributes

Definition Classes
FileStoreWriter
override def store(name: String, content: FileRepr, metadata: Metadata): UIO[FileRef]

Attributes

Definition Classes
FileStoreWriter
override def store(files: List[FileRepr], metadata: Metadata): UIO[List[FileRef]]

Attributes

Definition Classes
FileStoreWriter
override def update(urls: List[String], metadata: Metadata): UIO[Unit]

Attributes

Definition Classes
FileStoreWriter