Copied to clipboard

Flag this post as spam?

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


  • Jonas 123 posts 206 karma points
    Feb 18, 2015 @ 18:03
    Jonas
    0

    Import Images to existing nodes.

    Is it possible to import media to existing nodes?

    I have a lot of nodes with the filename as a textstring and now want to add the image to the node as a media item.

  • Amir Khan 1282 posts 2739 karma points
    Feb 18, 2015 @ 19:08
    Amir Khan
    0

    Hi Jonas, I've done this before, it will actually import the media for you as well. What datatype are you using to select the media?

    -Amir

  • Richard Soeteman 4035 posts 12842 karma points MVP
    Feb 18, 2015 @ 19:25
    Richard Soeteman
    0

    Hi Jonas,

    It can import the media only not to existing content out of the box

    For now the best you can do is have a look at the CMSImportRelation table. This contains the relation between the imported data and Umbraco nodes. If you can add the relation manually in this table then you can import the data to existing content since CMSImport then thinks it's an update.

    In UmbracoId you add the id of the Umbraco node, ImportProvider must be ”Content” and the DataSourceKey the Id of the imported record

    The DataSourceKey is formatted in the following way:

    [DataProvider][PrimaryKey field][Primary key value]

    For SQL Server it could be Sql serverId1

    I hope this helps a bit.

    Best,

    Richard

  • Jonas 123 posts 206 karma points
    Feb 19, 2015 @ 21:24
    Jonas
    0

    Thanks Richard, Managed to import a couple of lines, but now I am having problems with the backend logging me out after approx 1,5 minute.

    I have turned up the umbracoTimeOutInMinutes in web.config and the site still times out.

  • Richard Soeteman 4035 posts 12842 karma points MVP
    Feb 20, 2015 @ 06:00
    Richard Soeteman
    0

    Hi Jonas,

    Even when you are getting logged out the import process still completes. But weird that you are getting logged out, maybe check the log for exceptions?

    Best,

    Richard

Please Sign in or register to post replies

Write your reply to:

Draft