Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Vasilis 8 posts 118 karma points
    Dec 20, 2017 @ 18:44
    Vasilis
    0

    Custom umbraco property to upload pdf fails to update model.value properly on submit because of formSubmitting event

    I have created a custom property in umbraco 7.6.3 which is used to upload a pdf, rename it with a valid name, save it on a custom map in the website (instead of media), create a thumbnail with ghostscript and then update the value in the database in the format "/custompath/validname.pdf. The format is really important because I am updating a property from u4 and it should work with the values stored in the database. The code of the plugin is here https://drive.google.com/open?id=16SlbOX92htbMWGpAIvbdVlEdBHh7FF46

    My problem is that when I return the updated name from the controller the model.value is never updated to the value that I return. I assume that the on formSubmitting event is happening faster than the upload and is not waiting for the promise, or so it seems to me.

Please Sign in or register to post replies

Write your reply to:

Draft