// SaveSource upload a file path to the ipfs network and
// save the return hash as the source of the vnode.
SaveSource upload a file path to the ipfs network and
save the return hash as the source of the vnode.
// SaveSource upload a file path to the ipfs network and // save the return hash as the source of the vnode .
func (vn *VNode) SaveSource() error {
	if !vn.IsNew() {
		s, err := ipfs.UploadFile(vn.Path)
		if err != nil {
			return err
		}
		vn.Source.SetSrc(s)
		return vn.Source.Save(vn.ID)
	}
	return ErrIsUpToDate
}
func ( vn * VNode ) SaveSource ( ) error { if ! vn . IsNew ( ) { s , err := ipfs . UploadFile ( vn . Path ) if err != nil { return err } vn . Source . SetSrc ( s ) return vn . Source . Save ( vn . ID ) } return ErrIsUpToDate }
SaveSource upload a file path to the ipfs network and
save the return hash as the source of the vnode.
SaveSource upload a file path to the ipfs network and save the return hash as the source of the vnode .
// If ipfs hash empty, then upload to ipfs network.