1

I am working on a fully-developed site that is currently live, with hundreds, perhaps thousands of images and files in preset folders using File Manager in EE.

As a pre-purchase question, I guess... I would like to migrate the files & images to Assets, and was wondering if it was as easy as changing the channel fields from a File field to an Asset field?

Any help would be appreciated, thank you.

1

I was doing just this last week on a few thousand entries. Assets works really well at converting.

First make sure Assets is synchronised with your upload paths. Assets creates a reference to all the files in exp_assets_files.

EE File fieldtype stores it's data in the format {filedir_x}your-file.ext, where x is the reference to upload paths config.

When changing an existing fieldtype from File to Assets, Assets matches the file name against it's stored reference in exp_assets_files and create the appropriate rows in exp_assets_selections.

I did have some issues with files starting with underscore. I've yet to work out if this is a real issue or specific to my install.

| improve this answer | |
  • I couldn't get this to work for a assets fieldtype that's within a Grid fieldtype – Bransin May 5 '16 at 23:07
  • @Bransin This article is a couple of years old, I'm not sure if assets supported grid then and doesn't now or never did. Maybe it's something P&T can answer? – Elliot Lewis May 9 '16 at 15:36
  • Thanks for the response Elliot. After much digging, I'm finding there is conflict between Grid and P&T fieldtypes. P&T writes their stuff to support Matrix, but not Grid. Had to roll my own module to populate the exp_assets_selections by going through each Grid column. Gah! – Bransin May 24 '16 at 23:18
2

Yes, it is that easy, I've done this many times. In some earlier versions of Assets I had some issues doing this on a couple of sites, but later versions smoothed out the bumps.

As always, do this on a dev copy of the site first - or at the veery least, take a full DB backup first.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.