GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing leancloud.github.io — File - Documentation new File(name, data, mimeTypeopt)
An AV.File is a local representation of a file that is saved to the AV
cloud.
Parameters:
Methods(static) censor(objectId) → {Promise.<string>}
Request file censor.
Parameters:
Returns:
(static) createWithoutData(objectId) → {AV.File}
Creates a file object with exists objectId.
Parameters:
Returns:
the file object
(static) withURL(name, url, metaDataopt, typeopt) → {AV.File}
Creates a fresh AV.File object with exists url for saving to AVOS Cloud.
Parameters:
Returns:
the file object
censor() → {Promise.<string>}
Request file censor
Returns:
destroy(options) → {Promise}
Destroy the file.
Parameters:
Returns:
A promise that is fulfilled when the destroy
completes.
fetch(fetchOptions, options) → {Promise}
fetch the file from server. If the server's representation of the
model differs from its current attributes, they will be overriden,
Parameters:
Returns:
A promise that is fulfilled when the fetch
completes.
get(The) → {Any}
Gets the attributs of the file object.
Parameters:
Returns:
getACL() → {AV.ACL}
Returns the ACL for this file.
Returns:
An instance of AV.ACL.
metaData(attr, value) → {Object}Returns the file's metadata JSON object if no arguments is given.Returns the metadata value if a key is given.Set metadata value if key and value are both given. var metadata = file.metaData(); //Get metadata JSON object.
var size = file.metaData('size'); // Get the size metadata value.
file.metaData('format', 'jpeg'); //set metadata attribute and value.
Parameters:
Returns:
The file's metadata JSON object.
name()
Gets the name of the file. Before save is called, this is the filename
given by the user. After save is called, that name gets prefixed with a
unique identifier.
ownerId() → {String}
Returns the file's owner.
Returns:
The file's owner id.
save(optionsopt) → {Promise}
Saves the file to the AV cloud.
Parameters:
Returns:
Promise that is resolved when the save finishes.
set(Object, attr, value) → {String|Number|Array|Object}
Set the metaData of the file object.
Parameters:
Returns:
setACL(acl)
Sets the ACL to be used for this file.
Parameters:
setUploadHeader(key, value) → {AV.File}
Set a header for the upload request.
For more infomation, go to https://url.leanapp.cn/avfile-upload-headers
Parameters:
Returns:
this
size() → {Number}
Returns the file's size.
Returns:
The file's size in bytes.
thumbnailURL(width, heigth, quality, scaleToFit, fmt) → {String}
如果文件是图片,获取图片的缩略图URL。可以传入宽度、高度、质量、格式等参数。
Parameters:
Returns:
缩略图URL
toFullJSON() → {Object}
Returns a JSON version of the file with meta data.
Inverse to AV.parseJSON
Returns:
toJSON() → {Object}
Returns a JSON version of the object.
Returns:
url() → {String}
Gets the url of the file. It is only available after you save the file or
after you get the file from a AV.Object.
Returns:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |