Copied to clipboard

Flag this post as spam?

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


  • Mike Kelly 7 posts 59 karma points
    Jun 09, 2015 @ 13:14
    Mike Kelly
    0

    Can't see media files in back office following FTP upload to Azure

    I'm running Umbraco 7.2.5 on an Azure Web App, I've transferred some existing media files to the media folder via FTP (these are from on premise server that's being migrated to Azure) having already moved the content as package.

    I've done this many times before on Umbraco 6 and the files would show up, is 7 different? What I've tried so far:

    • Republished the entire site
    • Rebuilt the examine indexes from the Developer tab
    • Deleted the contents of the app_data folder to force a clean rebuild of the cache

    Any ideas on what else can be done to get them to show up?

    Update

    Just dawned on me that as I've done a clean install and added the content as a package that the references to the media don't exist in the database which is why they are not showing. Normally when I copy from one to another the references already exist.

    New Question

    What's the best way of migrating the media from one installation to another whilst keeping the references intact. Initial thoughts are to script the references via SQL so I retain the media id's.

    Any suggestions?

    Update 2

    I've gotten all the media file references as a csv from the db using the following SQL

    select *
    FROM cmsPropertyData
    INNER JOIN cmsPropertyType ON cmsPropertyData.propertytypeid = cmsPropertyType.id
    WHERE cmsPropertyType.dataTypeId = -90
    

    And I was planning to build a Insert script along the lines of

    INSERT INTO cmsPropertyData 
        (contentNodeId, versionId, propertytypeid, dataInt, dataDate, dataNvarchar, dataNtext) 
    VALUES 
        (1244, 8B166F4E-95C4-4AFB-8A8C-01A0527149EC, 6, NULL, NULL, /media/1001/test.jpg, NULL)
    

    The INSERT statement conflicted with the FOREIGN KEY constraint "FKcmsPropertyDataumbracoNode_id". The conflict occurred in database "test-db", table "dbo.umbracoNode", column 'id'.

    So clearly just inserting into the one table isn't going to work, anyone able to point me in the right direction to get round this.

Please Sign in or register to post replies

Write your reply to:

Draft