Copied to clipboard

Flag this post as spam?

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


  • Philip Hayton 98 posts 435 karma points
    Jun 06, 2022 @ 10:45
    Philip Hayton
    0

    File attachments on orders

    Hi Matt,

    I want to add attachments to orders - for example PDF event tickets, which then get passed onto the customer as part of a confirmation email.

    I've managed to add a file upload field to the additional info section using the generic Fileupload view but I can't for the life of me find where (or if) the file is actually getting saved on the server, so when I inspect the properties array it only contains the file name.

    Is this something that is supported by Vendr? If so what's the best way to handle the file upload?

    Any help is greatly appreciated!

    Kind regards

    Phil

  • Matt Brailsford 4125 posts 22223 karma points MVP 9x c-trib
    Jun 06, 2022 @ 10:50
    Matt Brailsford
    0

    Hi Phil,

    Good question. I'm not sure I've tried the file upload field as an order property, but if it does work the file should get saved into the media folder IIRC. I'd check there to see if it's getting saved, and if not, we might need to find an alternative solution.

    Matt

  • Philip Hayton 98 posts 435 karma points
    Jun 06, 2022 @ 10:55
    Philip Hayton
    0

    Hi Matt,

    Yeah that was my first thought but unfortunately not, even checked git to see if any new files had popped up somewhere random, but it doesn't look like they're hitting the server at all.

  • Matt Brailsford 4125 posts 22223 karma points MVP 9x c-trib
    Jun 06, 2022 @ 11:00
    Matt Brailsford
    0

    Hey Phil,

    Hmm, there is probably something we are meant to call server side. Vendr's property editor re-use is really rather basic and so we are probably just using them a "editors" and persisting whatever value comes out of the front end control.

    I'll add it to our issue tracker to look at, but in the meantime we might need to do something different.

    Best I can think atm is maybe a custom file upload prop editor that on file selection, uploads the file to the server (via a custom API controller) and then saves the path to the order 🤔

    Matt

    Update Here's a link to the feature request issue https://github.com/vendrhub/vendr/issues/370

  • Philip Hayton 98 posts 435 karma points
    Jun 06, 2022 @ 11:11
    Philip Hayton
    0

    Awesome thanks Matt, I'll have a look at the custom prop editor approach for the time being 👍🏻 Thanks for clarifying and raising the issue.

  • Philip Hayton 98 posts 435 karma points
    Aug 24, 2022 @ 13:50
    Philip Hayton
    101

    I finally got round to implementing this today. It was a bit fiddly so to save myself and others time in the future I've put together a quick demo of how to go about it in Umbraco 10:

    https://github.com/philipdanielhayton/Vendr.Contrib.Editors.FileUpload

  • Matt Brailsford 4125 posts 22223 karma points MVP 9x c-trib
    Aug 24, 2022 @ 13:58
    Matt Brailsford
    0

    Ooooh, nice!

    Thanks for sharing 🙏

Please Sign in or register to post replies

Write your reply to:

Draft