func (img *Image) LinkVideo(content []byte) {
	basename := fmt.Sprintf("%s.%s", img.Handle, "webm")
	dataPath := Repository.dataPath(img.Source, basename)
	if fi, err := os.Stat(dataPath); err != nil {
		if !os.IsNotExist(err) {
			panic(err)
		}
	} else {
		if fi != nil {
			log.Error("Image.LinkVideo", "image '%s' already has video", img.Handle)
		}
	}
	if err := ioutil.WriteFile(dataPath, content, 0660); err != nil {
		panic(err)
	}
}
// LinkVideo associates video bytes with the image, which is understood to be a
// still frame from the video, suitable for use as a thumbnail or cover still
// for the video. Errors if the image is not a video type (i.e. generated/timelapse.)
LinkVideo associates video bytes with the image, which is understood to be a
still frame from the video, suitable for use as a thumbnail or cover still
for the video. Errors if the image is not a video type
// LinkVideo associates video bytes with the image which is understood to be a // still frame from the video suitable for use as a thumbnail or cover still // for the video . Errors if the image is not a video type ( i . e . generated / timelapse . )
func (img *Image) LinkVideo(content []byte) {
	basename := fmt.Sprintf("%s.%s", img.Handle, "webm")
	dataPath := Repository.dataPath(img.Source, basename)
	if fi, err := os.Stat(dataPath); err != nil {
		if !os.IsNotExist(err) {
			panic(err)
		}
	} else {
		if fi != nil {
			log.Error("Image.LinkVideo", "image '%s' already has video", img.Handle)
		}
	}
	if err := ioutil.WriteFile(dataPath, content, 0660); err != nil {
		panic(err)
	}
}
func ( img * Image ) LinkVideo ( content [ ] byte ) { basename := fmt . Sprintf ( " " , img . Handle , " " ) dataPath := Repository . dataPath ( img . Source , basename ) if fi , err := os . Stat ( dataPath ) ; err != nil { if ! os . IsNotExist ( err ) { panic ( err ) } } else { if fi != nil { log . Error ( " " , " " , img . Handle ) } } if err := ioutil . WriteFile ( dataPath , content , 0660 ) ; err != nil { panic ( err ) } }
LinkVideo associates video bytes with the image, which is understood to be a
still frame from the video, suitable for use as a thumbnail or cover still
for the video.
LinkVideo associates video bytes with the image which is understood to be a still frame from the video suitable for use as a thumbnail or cover still for the video .