Copied to clipboard

Flag this post as spam?

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


  • Ben Schlaepfer 74 posts 101 karma points
    Aug 12, 2013 @ 11:18
    Ben Schlaepfer
    0

    How to reference files in the medial library within import CSV

    Hi there,

    The testing of my import file is working well for text information, but I am not sure how to reference files that are stored in the Umbraco Media Library and store that information in a Media Picker field.

    Is it just a relative URL or is there more to this?

    The scenario is that we will bulk load the initial set of pages (~800) each with 4 images and 6 pdfs but that a site author can use the UI to amend these images if they have been incorrectly allocated.

    Thanks
    Ben

  • Richard Soeteman 4049 posts 12922 karma points MVP 2x
    Aug 12, 2013 @ 13:36
    Richard Soeteman
    0

    Hi Ben,

    Yes the relation is based on the relative path. The files must exists on disk and it's only available in the PRO edition. The scenario you describe is very well possible with CMSIMport.

    Cheers,

    Richard

  • Ben Schlaepfer 74 posts 101 karma points
    Aug 12, 2013 @ 13:44
    Ben Schlaepfer
    0

    Hi Richard,

    Thanks for the speedy reply.

    The scenario in mind is that we would populate the media library independently of CMS Import then refer to the external URL of the media item within our CMS Import spreadsheet then map that column to the Media Picker datatype for future management.

    So the spreadsheet would contain (e.g.) /media/1003/45-005-D3-AD.jpg - an existing image - is that correct?

    I wasn't envisaging uploading the images by CMS Import but can see the benefits of doing so; I will look at the documentation around this - will the folder structure be maintained if I have nested folders?

    Best regards
    Ben

  • Richard Soeteman 4049 posts 12922 karma points MVP 2x
    Aug 12, 2013 @ 19:11
    Richard Soeteman
    0

    HI Ben,

    Hmm CMSImport assumes that it will import the files for you so it will be created automatically even when you reference media folders of Umbraco. It will keep the folder structure indeed.

    The mapping scenario will work as you described indeed but in this case the image will be reimported.

    Thanks,

    Richard

  • Ben Schlaepfer 74 posts 101 karma points
    Aug 14, 2013 @ 11:20
    Ben Schlaepfer
    0

    Hi Richard,
    Thanks - I bought the CMSImport product and I think I understand how to import images but after a test run and subsequent deletion of the imported pages and images I am getting an error message for each of the 3 lines in my CSV file:

    Import is finished 

    Import duration (h:m:s)
    00:00:01
    Records retrieved
    3
    Records imported
    0
    Errors
    3
    -
    The following errors occured

    Error while importing data for property 'importFile', datasource record PartName = 'BNC Solder / Clamp Plug', Error :No Media exists with id '1314' 
    Error while importing data for property 'importFile', datasource record PartName = 'BNC Straight Solder / Clamp Plug', Error :No Media exists with id '1316' 
    Error while importing data for property 'importFile', datasource record PartName = 'BNC Twist-on Plug', Error :No Media exists with id '1318' 
    -

     

    Images are referenced in the CSV as /ben/[image-name].jpg and stored in the root of my UMBRACO install (screen grab http://www.screencast.com/t/Y2o23ee7tj )

    Tried running as an update and as a new pages but same error occurs. I assumed that the media is created with each update so the existence of an ID is confusing me!

    Many thanks
    Ben 

     

  • Richard Soeteman 4049 posts 12922 karma points MVP 2x
    Aug 14, 2013 @ 11:28
    Richard Soeteman
    0

    HI Ben,

    I think the issue you are having is because of a bug in Umbraco V6.1 http://issues.umbraco.org/issue/U4-2622 The media relation is not deleted when you delete the images.

    I'm working on an update that fixes this and a few other issues in Umbraco V6.1. Hope to have it out tomorrow. For now would it be possible to delete the references from the CMSImportMediaRelation table?

    I can send you an early version of the fixed package later today if you like that?

    Thanks,

    Richard

  • Ben Schlaepfer 74 posts 101 karma points
    Aug 14, 2013 @ 11:58
    Ben Schlaepfer
    0

    Hi Richard,

    That's great - I removed all of the rows in that table and was able to successfully uploaded.

    A fix and instructions to apply would be fine tomorrow - I am "proof of concept" at the moment so not using in anger - manually removing entries will do for the moment.

    Thanks for your swift reply,

    Ben 

  • Richard Soeteman 4049 posts 12922 karma points MVP 2x
    Aug 21, 2013 @ 12:53
    Richard Soeteman
    0

    Hi Ben,

    I've fixed the issue in the 2.4 release. References are deleted now when you remove the media item.

    Hope this helps,

    Richard

  • Ben Schlaepfer 74 posts 101 karma points
    Aug 21, 2013 @ 13:53
    Ben Schlaepfer
    0

    Hi Richard.

    Thanks for updating me - are there upgrade instructions available (sorry new to package upgrades).

    Best wishes

    Ben

  • Richard Soeteman 4049 posts 12922 karma points MVP 2x
    Aug 21, 2013 @ 13:55
    Richard Soeteman
    0

    Hi Ben,

    You can just run the installer for this package. I always try to avoid creating multiple installers.

    Thanks,

    Richard

  • Ben Schlaepfer 74 posts 101 karma points
    Aug 21, 2013 @ 13:59
    Ben Schlaepfer
    0

    Hi Richard.

    Do I need to uninstall first? Package options shows no upgrades available.

    Thanks,

    Ben

  • Richard Soeteman 4049 posts 12922 karma points MVP 2x
    Aug 21, 2013 @ 14:05
    Richard Soeteman
    0

    Hi Ben,

    No just install without uninstalling and the no updates functionality is fake. It's always false :-(

    Thanks,

    Richard

Please Sign in or register to post replies

Write your reply to:

Draft