Home Reference Source
import ImgurUpload from '~/models/Request/ImgurUpload.js'
public class | source

ImgurUpload

Extends:

Request → ImgurUpload

Uploads to imgur

Constructor Summary

Public Constructor
public

constructor(url: string, file: File)

Pass as object

Method Summary

Public Methods
public

format(data: Object): string

Returns the URL of the new image

Inherited Summary

From class Request
protected
public

cancel()

Cancels the request.

public

format(data: Object): Object

Formats the request object and returns an object of Request<T>'s T.

public

async run(o: Object): Promise

Performs the request

Public Constructors

public constructor(url: string, file: File) source

Pass as object

Override:

Request#constructor

Params:

NameTypeAttributeDescription
url string

URL of imgur thing to upload

file File

File object to upload

Public Methods

public format(data: Object): string source

Returns the URL of the new image

Override:

Request#format

Params:

NameTypeAttributeDescription
data Object

Return:

string (nullable: true)