Copied to clipboard

Flag this post as spam?

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


  • Peter Cort Larsen 421 posts 1038 karma points
    Jan 19, 2011 @ 13:57
    Peter Cort Larsen
    0

    Importing media question about subfolders

    Hi,

    Great package. I am planning to purchase it for a project, soon.

    Is it possible to import files which are related to img tags or a tags in content text? And is it possible to maintain subfolder structure for these files and recreate the structure inside the media archive in Umbraco?

     

  • Richard Soeteman 4046 posts 12899 karma points MVP 2x
    Jan 19, 2011 @ 14:33
    Richard Soeteman
    0

    Hi peter,

    Thanks. CMSImport Pro will pickup all images from the image tag if its used in the TinyMce editor and if the path is relative /images/example.gif. You need to have this images folder in the root of your Umbraco install.

    CMSImport will respect the original folder structure. So if you have an image /images/folder1/folder2/example.gif. CmsImport will create the folder structure images/folder1/folder2 for you.

    For more info about the media import feature checkout chapter 5 of the manual which can be found at http://www.cmsimport.com/documentation.aspx

    Thanks,

    Richard

     

     

     

     

  • Peter Cort Larsen 421 posts 1038 karma points
    Jan 19, 2011 @ 15:00
    Peter Cort Larsen
    0

    Hi,

    Thanks for your reply.

    Does the pro version come with source code?

    Cause i need to do a bit a coding in order to convert my img tag urls to the match the folder structure of the current cms is order for cmimport to map img tag correctly.

    I have for ex. image src like this: /media(IMAGEID, LCID) or /media(IMAGEID, LCID)/FILENAME.EXT, these dosnĀ“t illustrate the files folder relations.
    All images for the current solution are placed in one folder. But in the media archive of the cms, they can be placed in subfolders.

    Info about their location is stored in the database.

    Its a composite 3.8 solution, which is going to be converted to Umbraco.

    So a solution could be, to get the image folder structure from a xml file (where the complete file and folder structure is illustrated), and replace the image src with a more meaningfull path. Something like /IMPORTEDMEDIA/DANISH/MAIN_FOLDER/SUB_FOLDER/FILENAME.EXT, so this can be created during the import process.

     

  • Richard Soeteman 4046 posts 12899 karma points MVP 2x
    Jan 19, 2011 @ 15:18
    Richard Soeteman
    0

    Hi Peter,

    It doesn't come with the source code. But you can extend it realy easy using a FieldAdapter or an event handler . A FieldAdapter gets called when cmsimport does the mapping. So in your case you could write a FieldAdapter that reads the structure from the xml file and build the structure based on that. Or use an event handler that modifies the structure of you media after a record is imported.

    This comes with support so if you get stuck you can email me and I will help you with your implementation.

    Thanks,

    Richard

  • Peter Cort Larsen 421 posts 1038 karma points
    Jan 26, 2011 @ 14:24
    Peter Cort Larsen
    0

    Hi, I waiting for the customer. Is there somewhere i can see how to use a FieldAdapter together with your code?

Please Sign in or register to post replies

Write your reply to:

Draft