File tree Expand file tree Collapse file tree 1 file changed +1
-1
lines changed Expand file tree Collapse file tree 1 file changed +1
-1
lines changed Original file line number Diff line number Diff line change @@ -131,7 +131,6 @@ func (b64embedder *mailAttachmentBase64Embedder) AttachmentSrcToBase64DataURI(ct
131131 if attachment .Size + b64embedder .estimateSize > b64embedder .maxSize {
132132 return "" , fmt .Errorf ("total embedded images exceed max limit" )
133133 }
134- b64embedder .estimateSize += attachment .Size
135134
136135 fr , err := storage .Attachments .Open (attachment .RelativePath ())
137136 if err != nil {
@@ -152,6 +151,7 @@ func (b64embedder *mailAttachmentBase64Embedder) AttachmentSrcToBase64DataURI(ct
152151
153152 encoded := base64 .StdEncoding .EncodeToString (content )
154153 dataURI := fmt .Sprintf ("data:%s;base64,%s" , mimeType .GetMimeType (), encoded )
154+ b64embedder .estimateSize += int64 (len (dataURI ))
155155 return dataURI , nil
156156}
157157
You can’t perform that action at this time.
0 commit comments