storeimage

package
v1.3.0-rc Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 22, 2018 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DirProjects     = "projects"
	DirProjectImage = "projectimage"

	FileProjectProfile = "image"

	PathPlaceholderImage = "static/img/placeholder.svg"
)

Variables

This section is empty.

Functions

func GetProjectImagePath

func GetProjectImagePath(pathInDataBase string) string

GetProjectImagePath will check if the stored image is present in the data directory. If the image can not be found the path of the placeholder will be returned.

func WriteProjectImageToFile

func WriteProjectImageToFile(imageSource string, project project.Project) (string, error)

WriteProjectImageToFile will write the project image to file. The imageSource can either be a base64 encoded string or a relative path to an image. Only if the image is a base64 encoded string (which means the user uploaded a new image) then it will be written in the data/<project name> directory for the project. If the image is a path, the project.Image property will be returned

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL