Copied to clipboard

Flag this post as spam?

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


  • Kurt 29 posts 111 karma points
    May 06, 2015 @ 20:01
    Kurt
    0

    Upload XML file through the Umbraco UI?

    Using Umbraco 7.2.2, what I'm looking to do is use an XML file as a data source (to be parsed by a separate XSLT file). The XML will change maybe a couple times a year and when changed, I'd like to be able to upload it quickly and easily (and maybe allow it to be uploaded by another user with permissions). Just to be clear, I'm not talking about uploading it through a website file picker element.

    My problem is that I can't seem to figure out how to upload it. It doesn't show up under the Media section if I try it through there. And searching elsewhere brings up very little relating to this topic (yet LOTS on the general topic of XML, so it's hard to wade through everything). Surely this must be possible? But how?

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    May 06, 2015 @ 20:41
    Jan Skovgaard
    0

    Hi Kurt and welcome to our :)

    It's probably a mime-type thing where you need to declare the XML mime-type in the web.config on the app level before it's being recognized and accepted by the server. However I'm wondering what your scenario is? I'm thinking that perhaps there are better ways of achieving what you need?

    What content will the XML file consist of? And how will it be consumed?

    /Jan

  • Chriztian Steinmeier 2798 posts 8787 karma points MVP 7x admin c-trib
    May 06, 2015 @ 21:21
    Chriztian Steinmeier
    2

    Hi Kurt,

    You need to check the <disallowedUploadFiles> key in the umbracoSettings.config file and possibly remove xml from the list of filetypes not allowed.

    With that out of the way, you can put an upload field on any node and upload the XML file there - and thus, have the path to the file always available. And uploading a new version is as easy as can be.

    /Chriztian

  • Kurt 29 posts 111 karma points
    May 06, 2015 @ 22:58
    Kurt
    0

    Chriztian, thanks. Removing xml from that obviously works.

     

    Jan: Right now, we have a database table with some data (about 1000 records). The data gets updated approximately once every couple months. Right now, updating that isn't exactly easy, as it requires access to the database/server and knowledge of the table (and understanding of how to update it, etc.). Ideally, we wouldn't have to give someone access to the database just to make these updates. The format of the data would also make it relatively easy to segment out into XML. And XML is easily to understand, so if a different person has to make a change it would be easier for them to do (rather than them trying to update a database table, as mentioned before).

    If there's other/better ways of doing this, I'm open to suggestions. Thanks!

Please Sign in or register to post replies

Write your reply to:

Draft