Skip to content

mrm/uploader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

49 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Create a new creative uploader as such:

var uploader = CreativeUploader({
    types: ['file', 'url', 'content', 'pop'],
    sizes: ['120x600', '160x600', '300x250', '468x60', '728x90'],
    target: 'content',
    onNewCreatives: function (creatives) {
        console.log(creatives);
    }
});

Get the store with uploader.store(). Each creative is in the following format:

{
    content_type: ['url', 'content', 'file', 'pop'],
    type: ['html','js'], // Only with content and url
    clickUrl: '',
    filename: 'myfile.png',
    filesize: '342343',
    size: '300x250',
    url: '',

    // Errors, set if the creative is invalid.
    state: 'invalid',
    permanentlyInvalid: true, // Invalid images are always invalid, except for clickUrl
    reason: 'Invalid size',
    showErrors: true,  // Show errors for all creatives
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published