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

UploadImageButton

Extends:

src/common/components/Button.js~Button → 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.

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

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