Search Results for

Show / Hide Table of Contents

# Class UploadResult

Represents the JSON result returned for upload requests.

##### Inheritance

object
UploadResult

##### Inherited Members

object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()

###### Namespace: AjaxUploader.Models

###### Assembly: AjaxUploader.dll

##### Syntax

    public class UploadResult

### Properties

#### ErrorMessage

Gets or sets the error message when the request fails.

##### Declaration

    public string ErrorMessage { get; set; }

##### Property Value

Type | Description
--- | ---
string |

#### FileGuid

Gets or sets the uploaded file GUID when the request succeeds.

##### Declaration

    public Guid? FileGuid { get; set; }

##### Property Value

Type | Description
--- | ---
Guid? |

#### FileName

Gets or sets the original file name.

##### Declaration

    public string FileName { get; set; }

##### Property Value

Type | Description
--- | ---
string |

#### FileSize

Gets or sets the file size in bytes.

##### Declaration

    public long FileSize { get; set; }

##### Property Value

Type | Description
--- | ---
long |

#### Success

Gets or sets whether the upload request succeeded.

##### Declaration

    public bool Success { get; set; }

##### Property Value

Type | Description
--- | ---
bool |

### Methods

#### Error(string)

Creates a failed upload result.

##### Declaration

    public static UploadResult Error(string message)

##### Parameters

Type | Name | Description
--- | --- | ---
string | message |

##### Returns

Type | Description
--- | ---
UploadResult |

#### Ok(Guid, string, long)

Creates a successful upload result.

##### Declaration

    public static UploadResult Ok(Guid guid, string fileName, long fileSize)

##### Parameters

Type | Name | Description
--- | --- | ---
Guid | guid |
string | fileName |
long | fileSize |

##### Returns

Type | Description
--- | ---
UploadResult |