Download images for sources (#96)
* [WIP] hooked up photo downloading to source metadata worker * Added new attributes for source images * Added option to profile form
This commit is contained in:
@@ -34,6 +34,19 @@ defmodule Pinchflat.Filesystem.FilesystemHelpers do
|
||||
File.write!(filepath, content, modes)
|
||||
end
|
||||
|
||||
@doc """
|
||||
Copies a file from source to destination, creating directories as needed.
|
||||
|
||||
Returns :ok | raises on error
|
||||
"""
|
||||
def cp_p!(source, destination) do
|
||||
destination
|
||||
|> Path.dirname()
|
||||
|> File.mkdir_p!()
|
||||
|
||||
File.cp!(source, destination)
|
||||
end
|
||||
|
||||
@doc """
|
||||
Fetches the file size of a media item and saves it to the database.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user