Create a seaweed_master
object for interacting with SeaweedFS master API
See https://github.com/chrislusf/seaweedfs/wiki/Master-Server-API for details
new()
Create client object for sending http requests to seaweed master
seaweed_master$new(seaweed_url)
seaweed_url
Root URL of Seaweed master
A new seaweed_master
object
assign()
Assign a file key.
Increase a number in master server's memory and return fid, volume
server url and volume server public URL. Can be used to to upload
a file to <publicUrl>/<fid>
.
seaweed_master$assign(collection = NULL)
collection
Collection name, acts as a namespace for files.
fid, volume server URL and volume server public URL
lookup()
Lookup volume
Look up volumes by ID or by file ID to get volume URL. Volumes might move so we need to lookup their URL to get up to date location.
seaweed_master$lookup(id, collection = NULL)
id
volume ID or file ID to locate volume for
collection
Optional collection name this volume belongs to.
List of seaweed_volume()
objects representing the volumes
delete_collection()
Delete a collection of files
seaweed_master$delete_collection(collection)
collection
Collection name.
Nothing, called for side effects
upload()
Upload file to SeaweedFS
seaweed_master$upload(path)
path
Path to file to be uploaded
The uploaded location, name, URL and size
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.