class UploadService::UploadResult

Overview

Result of uploading a file.

Defined in:

services/upload_service.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(file_uri : Nil | String = nil, file_path : Nil | String = nil, errors : Hash(String, Array(String)) = Hash(String, Array(String)).new) #

[View source]

Instance Method Detail

def add_error(field : String, message : String) #

Adds an error.


[View source]
def errors : Hash(String, Array(String)) #

[View source]
def errors=(errors : Hash(String, Array(String))) #

[View source]
def file_path : String | Nil #

[View source]
def file_path=(file_path : String | Nil) #

[View source]
def file_uri : String | Nil #

[View source]
def file_uri=(file_uri : String | Nil) #

[View source]
def valid? #

Returns true if upload was successful.


[View source]