Skip to content

supported attachment? #150

Closed Answered by ZinedineR
ZinedineR asked this question in Q&A
Oct 25, 2023 · 3 comments · 1 reply
Discussion options

You must be logged in to vote

Nevermind, I already know why, the file needs to be opened first. I thought by os.Create the file already opened

file, err = os.Open(pathFile)
			if err != nil {
				return errs.Wrap(err)
			}
			defer file.Close()
			_, err = filevalidation.ValidateImagePath(pathFile)
			if err != nil {
				return errs.Wrap(err)
			}
			m.AttachReader(fileName, file)

Replies: 3 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@wneessen
Comment options

Answer selected by wneessen
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants