in line 605 of wordpress_import.module
include this to alias the files/images location

  $thepath = url(file_directory_path());
  $subpath = "/images";
  $myURL = $thepath . $subpath;
  $content = str_replace('/wp-content/uploads', $myURL , $content);

then copy the whole folder of wp-content/uploads from wordpress folder to drupal file directory path (e.g. sites/all/default/)

CommentFileSizeAuthor
wordpress_import.zip7.28 KBwalktalker

Comments

walktalker’s picture

Assigned: walktalker » Unassigned
walktalker’s picture

I'm not so superb about webserver > webserver file transfer. could anyone include this in the module?

yrocq’s picture

Status: Active » Needs work

Hi walktalker,

Thanks for your interest in wordpress import.

Your code is a nice workaround, but I'm afraid it isn't robust enough to be integrated into the module. If a post contains the phrase "Wordpress stores its files in the directory /wp-content/uploads", it will be replaced by "Wordpress stores its files in the directory /sites/example/files/images". Furthermore, I think a better approach would be to create a customisable filter, so that the original content won't be changed and we will be able to support special cases, for example a drupal installed in a subdirectory.

walktalker’s picture

I agree with you. I never think to write a module would be that hard... ^.^
Anyway, this is my 1st trial to work around a module. I'd need to learn more about creating a form to gather more var.

lavamind’s picture

Version: 6.x-1.x-dev » 6.x-2.x-dev
Assigned: Unassigned » lavamind
Status: Needs work » Active

Fetching post images is implemented using cURL in 6.x-2.x-dev, removing need to manually transfer files. However, other types of content aren't transferred, though a similar approach could eventually be used for attachements.

lavamind’s picture

Status: Active » Closed (duplicate)