RSS Feed/News How to access attachments in post pre-save?

Status
Not open for further replies.

ENXF NET

Administrator
Staff member
Administrator
Moderator
+Lifetime VIP+
S.V.I.P.S Member
S.V.I.P Member
V.I.P Member
Collaborate
Registered
Joined
Nov 13, 2018
Messages
28,640
Points
823

Reputation:

Hi,

I'm creating an add-on where I want to run some checks on pre-save when a new thread is being created. If those checks fail, I throw an error to prevent the save from occurring.

I need to access attachments that may have been added to the post. Since we're in pre-save, they haven't been associated with the post yet (and there's no post id), so I'm not sure how to go about this. I had a thought that I could use the attachment hash, but I don't know how to access that either.

Can...

Read more

Continue reading...
 
Status
Not open for further replies.
Top