List Background upload (#582)
Add filesize check when uploading a new file Fix error 500 if the uploaded background was not an unsplash one Add upload background setting to info endpoint Add config docs Fix lint Return list background type if it was uploaded Add file upload Add docs Save uploaded backgrounds as file Add background upload handler Co-authored-by: kolaente <k@knt.li> Reviewed-on: https://kolaente.dev/vikunja/api/pulls/582
This commit is contained in:
@ -220,7 +220,7 @@ func (p *Provider) Search(search string, page int64) (result []*background.Image
|
||||
|
||||
// Set sets an unsplash photo as list background
|
||||
// @Summary Set an unsplash photo as list background
|
||||
// @Description Sets a photo from unsplash as list background.1
|
||||
// @Description Sets a photo from unsplash as list background.
|
||||
// @tags list
|
||||
// @Accept json
|
||||
// @Produce json
|
||||
@ -308,6 +308,9 @@ func Pingback(f *files.File) {
|
||||
// Check if the file is actually downloaded from unsplash
|
||||
unsplashPhoto, err := models.GetUnsplashPhotoByFileID(f.ID)
|
||||
if err != nil {
|
||||
if files.IsErrFileIsNotUnsplashFile(err) {
|
||||
return
|
||||
}
|
||||
log.Errorf("Unsplash Pingback: %s", err.Error())
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user