Using SQL, for files that need the appropriate filedir placed in front of the filename
*this assumes you changed your ngen file field to just “file”, if not run this query to set them to file:
UPDATE exp_matrix_cols SET col_type = 'file' where col_type = 'ngen_file_field'
UPDATE exp_channel_fields SET field_type = 'file' where field_type = 'ftype_id_11'*note that the query (above) - you need to set the appropriate # for ftype_id_11, you can find that # from exp_ff_fieldtypes.fieldtype_id
this query (below) will change
filename.jpghttps://ellislab.com/asset/images/ent-partner-work/filename.jpgUPDATE exp_channel_data SET field_id_126 = Concat('https://ellislab.com/asset/images/ent-partner-work/', field_id_126) WHERE (channel_id = 95 AND field_id_126 != '')*change the _126, _3, 95 to the appropriate id of the field_id, channel_id and filedir you’re looking to change at that time
If you notice two lines of (usually images, with the _thumb.jpg appended to end),
update exp_channel_data set field_id_173 = Concat('https://ellislab.com/asset/images/ent-partner-work/',TRIM(TRAILING '\n' FROM SUBSTRING_INDEX(field_id_173, '\n', 1))) where channel_id = 121 and field_id_173 != ''that query will change
filename.jpg
filename_thumb.jpgto
https://ellislab.com/asset/images/ent-partner-work/filename.jpgthe filename_thumb.jpg is the option of thumb being enabled in Mark Huot’s file fieldtype
for files within matrix:
you could append the appropriate filedir to the beginning of the fields like:
UPDATE exp_matrix_data SET col_id_2 = Concat('https://ellislab.com/asset/images/showcase/', col_id_2) where col_id_2 != ''
*as mentioned above, be sure to set the appropriate ID’s within the query
*don’t forget to sync your files within the file manager
If anyone can improve and/or add to this, please respond, I am still in the middle of upgrading a huge v1.7.1 site to v2, so any help is appreciated.