Skip to content

How to access files and send them via email? #4899

Closed Answered by ganigeorgiev
meta-boy asked this question in Q&A
Discussion options

You must be logged in to vote

No, I don't recommend this but honestly I no longer understand what you are trying todo.

The more I read you code sample the more I'm getting confused. The function callback signature to $app.dao().findRecordById is not correct. I don't know from where did you get the function(err, userRecord) but you can check the docs in https://pocketbase.io/jsvm/classes/Dao.html#findRecordById. The same apply for the saveRecord function - it doesn't accept a callback argument.

My recommendation is to use a simple link in your email but if that's not an option and you want a file attachment, then here is a slightly modified version of your code (I haven't tested it; treat it as a pseudo-code):

onModelA…

Replies: 1 comment 6 replies

Comment options

You must be logged in to vote
6 replies
@meta-boy
Comment options

@meta-boy
Comment options

@ganigeorgiev
Comment options

Answer selected by meta-boy
@meta-boy
Comment options

@meta-boy
Comment options

@meta-boy
Comment options

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