[wp-trac] [WordPress Trac] #5466: Import file attachments
WordPress Trac
wp-trac at lists.automattic.com
Fri Dec 14 04:39:27 GMT 2007
#5466: Import file attachments
-------------------------+--------------------------------------------------
Reporter: tellyworth | Owner: anonymous
Type: enhancement | Status: new
Priority: normal | Milestone: 2.5
Component: General | Version:
Severity: normal | Keywords:
-------------------------+--------------------------------------------------
The enclosed patch supports file attachment importing with wxr files.
If the 'Import attachments' box is checked on step 2 of the import (the
Assign Authors page), the importer will attempt to download attachments
from their original URLs to the uploads dir of the local server. I've
used the existing upload handling functions as much as possible, with a
few tweaks here and there, so correct error handling and capability checks
should be enforced.
HTTP fetching is with an expanded version of the wp_get_http_headers()
function. I also took the opportunity to remove some duplicate code in
wp-admin/includes/file.php.
For now the new import code is in WP_Import, but my plan is to eventually
move much of it into a base class so it can be reused by the other
importers.
Unit tests are inhttp://svn.automattic.com/wordpress-tests/wp-testcase/ -
see test_import_wp.php, test_includes_file.php and
test_includes_functions.php.
--
Ticket URL: <http://trac.wordpress.org/ticket/5466>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list