smart_city v2.9.0 SmartCity.HostedFile View Source

Defines the information needed to process uploaded files by components of the system including the files' type, parent identifier, and location info.

Link to this section Summary

Functions

Instantiates an instance of a file upload event struct.

Standardize file type definitions by deferring to the official media type of the file based on a supplied extension.

Link to this section Types

Link to this type

extension()

View Source
extension() :: String.t()
Link to this type

mime_type()

View Source
mime_type() :: String.t()
Link to this type

t()

View Source
t() :: %SmartCity.HostedFile{
  bucket: bucket(),
  dataset_id: id(),
  key: key(),
  mime_type: mime_type(),
  version: term()
}

Link to this section Functions

Link to this function

new(msg)

View Source
new(String.t() | map()) :: {:ok, map()} | {:error, term()}

Instantiates an instance of a file upload event struct.

Standardize file type definitions by deferring to the official media type of the file based on a supplied extension.