Reference Source
import UploadImageButton from 'flarum/admin/components/UploadImageButton'
public class | source

UploadImageButton

Extends:

src/common/Component.js~ComponentButton → UploadImageButton

Member Summary

Public Members
public

loading: *

Method Summary

Public Methods
public

remove()

Remove the logo.

public
public

upload()

Prompt the user to upload an image.

public

view(vnode: *): *

Protected Methods
protected

failure(response: Object)

If upload/removal fails, stop loading.

protected

success(response: Object)

After a successful upload/removal, reload the page.

Inherited Summary

From class Button
public

view(vnode: *): *

protected

getButtonContent(children: *): *

Get the template for the button's content.

Public Members

public loading: * source

Public Methods

public remove() source

Remove the logo.

public resourceUrl(): * source

Return:

*

public upload() source

Prompt the user to upload an image.

public view(vnode: *): * source

Override:

Button#view

Params:

NameTypeAttributeDescription
vnode *

Return:

*

Protected Methods

protected failure(response: Object) source

If upload/removal fails, stop loading.

Params:

NameTypeAttributeDescription
response Object

protected success(response: Object) source

After a successful upload/removal, reload the page.

Params:

NameTypeAttributeDescription
response Object