Pictures

Maintainer:Sebastian Kippe seba.nosp@m.stian@kip.nosp@m..pe
Version:0.8.0

This module stores collections of pictures, called “albums”.  Each folder at the root of the module is treated as an album, unless it starts with a dollar sign ($).

Summary
Pictures
Exports
listPublicAlbumsList the public albums.
listPrivateAlbumsList the private albums.
openPublicAlbumOpen a public album.
openPrivateAlbumOpen a private album.
AlbumAn album is a collection of pictures.
Properties
nameThe Album name.
clientThe <BaseClient> instance scopped on this album.
Functions
storeStore a picture.
removeRemove a picture.
listList the pictures.
getPictureURLGet the absolute URL of a picture.

Exports

listPublicAlbums

List the public albums.

Returns

An array with the albums names.

listPrivateAlbums

List the private albums.

Returns

An array with the albums names.

openPublicAlbum

Open a public album.

The album is synchronized and then returned.

Parameters

namethe album name.

Returns

The (synchronized) album.

openPrivateAlbum

Open a private album.

The album is synchronized and then returned.

Parameters

namethe album name.

Returns

The (synchronized) album.

Album

An album is a collection of pictures.  If caching is enabled for an album (see <Album.open> code), consider the method <Album.close> to end caching the very album(s).

Summary
Properties
nameThe Album name.
clientThe <BaseClient> instance scopped on this album.
Functions
storeStore a picture.
removeRemove a picture.
listList the pictures.
getPictureURLGet the absolute URL of a picture.

Properties

name

The Album name.

client

The <BaseClient> instance scopped on this album.

Functions

store

store: function(mimeType,
name,
data)

Store a picture.

If the picture belongs to a public album, this URL can be used to display the picture without authentication.

Parameters

mimeTypethe picture MIME type.
namethe picture name.
datathe picture (expected as an `ArrayBuffer`).

Returns

A promise, which will be fulfilled with the absolute URL of the newly uploaded picture (see getPictureURL).

remove

remove: function(name)

Remove a picture.

Parameters

namethe picture name.

list

list: function()

List the pictures.

Returns

An array with the album pictures names.

getPictureURL

getPictureURL: function(name)

Get the absolute URL of a picture.

If the picture belongs to a public album, this URL can be used to display the picture without authentication.

Parameters

namethe picture name.

Returns

The absolute URL of the picture.

An album is a collection of pictures.
store: function(mimeType,
name,
data)
Store a picture.
remove: function(name)
Remove a picture.
list: function()
List the pictures.
getPictureURL: function(name)
Get the absolute URL of a picture.
Close