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

UploadImageButton

Extends:

flarum/components/Button~Button → UploadImageButton

Member Summary

Public Members
public

Method Summary

Public Methods
public

init()

public

remove()

Remove the logo.

public
public

upload()

Prompt the user to upload an image.

public

view(): *

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: boolean source

Public Methods

public init() source

public remove() source

Remove the logo.

public resourceUrl(): * source

Return:

*

public upload() source

Prompt the user to upload an image.

public view(): * source

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