Forums / SmartComponent Library - Developer Forum / How to upload the file with a web request

How to upload the file with a web request

4 posts, 0 answered
  1. Simon Prinsloo
    Simon Prinsloo avatar
    11 posts
    Registered:
    20 Feb 2019
    18 Nov
    Link to this post
    Good day

    I have a situation where the user wants to upload a csv file which we should then use to create a large number of records.

    What is the correct approach to achieve this? The RestEntitiesWebHandler only allows a JsonConstruct or an empty memptr, so that is clearly not the way to go.
  2. Mike Fechner
    Mike Fechner avatar
    296 posts
    Registered:
    14 Sep 2016
    18 Nov in reply to Simon Prinsloo
    Link to this post
    My guess would be that you have to implement a Web handler for this purpose.
  3. Simon Prinsloo
    Simon Prinsloo avatar
    11 posts
    Registered:
    20 Feb 2019
    18 Nov
    Link to this post
    Thanks Mike. Will do it like that then.

    I was hoping there is a ready made solution for this similar to the RestEntitiesWebHandler. But I guess it is a fairly rare use case.

  4. Mike Fechner
    Mike Fechner avatar
    296 posts
    Registered:
    14 Sep 2016
    18 Nov in reply to Simon Prinsloo
    Link to this post
    There may be at some point (no promise though) - but we're thinking in terms of a more specific file upload endpoint. There are some security considerations to make. 
4 posts, 0 answered