Code Monkey home page Code Monkey logo

jazure's Introduction

This is javascript sdk for azure storage.

To use this plugin, you need:

  • a modern browser that support HTML5.
  • an azure storage account
  • open the CORS of your storage account.
  • jquery(all version should be ok.)
//notice ja is an alise of jAzure
var container=ja.storage.container(containerSas);
var blob=container.getBlob('myblob');
blob.upload(file,function(){
	//before upload.
},progress:function(ev){
	//uploading...
},success:function(data){
	//upload success.
},error:function(){
	//upload error.
});

##container

var container = ja.container(sas);

Properties:

Name Default Readonly Description
sas passed in by parameter true the sas url of the container

Functions:

Name Return Async Description
getBlob blob false accored the passed in blobName and blobType, reurn a blob instance.
getBlockBlob blob false return a block blob instance.
getPageBlob blob false return a page blob instance.
listBlobs null true get blob list under the container.

##blob

var blob = container.getBlob(blobName,blobType)

Properties:

Name Default Readonly Description
name passed in true the long name of the blob.
url auto generated true the url of the blob.
type passed in true the blob type(PageBlob/BlockBlob).
properties null false the properties of the blob.
metadata empty object false the metadata of the blob.

Functions:

Name Return Async Description
upload null true upload the blob to azure storage server.
remove null true delete the blob from azure storage server.
download null false down the blob to local machine.
getProperties null true get blob properties from server.
setProperties null true set the blob properties(save to server).
getMetadata null true get blob metadata from server.
setMetadata null true set the blob metadata(save to server).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.