Skip to content

h1u2i3/azalea

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Azalea

Azalea is aim to make upload file in Phoenix easy. It is still in development. You can check the Example

Installation

  1. Add azalea to your list of dependencies in mix.exs:
def deps do
  [{:azalea, "~> 0.0.1"]
end
  1. Ensure azalea is started before your application:
def application do
  [applications: [:azalea]]
end

The upload steps

  1. Normally we can get a file from Plug, it is a Plug.Upload(see the guide).

    %Plug.Upload{
      content_type: "image/jpg",
      filename: "demo.jpg",
      path: "/tmp/file/path"}
    }

first we should check the file with the checker you define to make sure we get the file we want.

  1. Do some work with the file or file data (background). You can define what you want.

  2. Save to the target disk you supply, or save to cloud (background).

  3. Generate the needed data (with the data we can read from the database and then we can get the file link) and save to database.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages