• Resolved esadsi

    (@esadsi)


    Hi,

    could you add a custom hook that allows approving or rejecting file based on the uploaded file content? I mean once the file is uploaded to the temporary folder a custom hook is triggered passing its path/filename. If the file is rejected by our custom add_action a non-empty error message is returned to the hook to reject the download and display the error. Else the returned message is empty and the file is approved then.

    Best regards

Viewing 12 replies - 1 through 12 (of 12 total)
  • Plugin Author Glen Don Mongaya

    (@glenwpcoder)

    Hi @esadsi

    Sorry, for the late reply.

    Could you provide an example that illustrates what you were aiming to accomplish?

    Thread Starter esadsi

    (@esadsi)

    Hi,

    at the end of the upload your plugin would trigger a custom hook (do_action) with the file path as a parameter. My function.php (add_action) opens and reads this file. In the hypothetical case of a text file for this example, if a certain word is found (or any other needed check), the returned value is “Error, this file bla bla…”, otherwise the returned value is empty.

    If an error is returned to your plugin, this error message is shown and the file is deleted. Otherwise, the upload processe can be completed normally.

    Plugin Author Glen Don Mongaya

    (@glenwpcoder)

    Thanks for your explanation, I can definitely add custom hook for that.

    Are you using pro or free version?

    Thread Starter esadsi

    (@esadsi)

    Hi,

    I use the free version, but I’ll be happy to buy the pro if you add this hook in it.

    Thread Starter esadsi

    (@esadsi)

    Hi, any news about this hook ?

    Thread Starter esadsi

    (@esadsi)

    Hi,

    you didn’t answer me, did you add this hook and can we buy the pro version?

    Best regards

    Plugin Author Glen Don Mongaya

    (@glenwpcoder)

    Hello @esadsi sorry I missed your email.

    I will be adding this hook in the PRO version and it’s available tomorrow.

    Plugin Author Glen Don Mongaya

    (@glenwpcoder)

    @esadsi we have added a custom hook after the upload on our Pro version.

    You can see our sample snippet here – https://pastebin.com/ixVmgjuk

    Please let me know.

    Thread Starter esadsi

    (@esadsi)

    Hi,

    It’s exactly what we need. You should see in few days a DSI purchase of the pro version.

    Thx a lot !

    Thread Starter esadsi

    (@esadsi)

    Hi,

    could you contact me because the only way to buy it is by PayPal. My company doesn’t have a PayPal account. Any other solution ?

    Cheers

    Plugin Author Glen Don Mongaya

    (@glenwpcoder)

    Hey @esadsi ,

    You can still purchase the Pro version even without having a PayPal account.

    Just click the PayPal on the checkout and you have an option to pay using bank or credit card. (see this: https://snipboard.io/9iuEn2.jpg)

    Let me know.

    Thread Starter esadsi

    (@esadsi)

    Hi, unfortunatly Paypal just ask for “create an account”…

    Anyway, I’ll buy it with my personal account.

    Cheers

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Approve or Reject Files’ is closed to new replies.