User "Brion VIBBER" changed the status of MediaWiki.r85911. Old Status: new New Status: ok
User "Brion VIBBER" also posted a comment on MediaWiki.r85911. Full URL: http://www.mediawiki.org/wiki/Special:Code/MediaWiki/85911#c17824 Commit summary: Add support for importing/exporting files. This can be done by embedding the image as base64 in the XML stream or by copying the images directory manually and pointing the importer to the base images directory. Currently only backend code available and a few member variables need to be modified to enable the functionality. Export.php: * Add <rel> and <sha1base36> elememnts to the XML output * Add optional <archivename> and <contents> elements to the XML output. <contents> contains an encoding attribute, which is currently only set to base64. Import.php: * Add Import::$mImageBasePath which should point to the images/ directory to import from * Add methods to WikiRevision (terrible name btw) to set the rel, hash, archivename and filesrc. * Cleanup and made WikiRevision::importUpload working. It's still quite a mess though OldLocalFiel.php: * Fix a few timestamp related things from r85635 Comment: This output format has some potential problems with very large files; videos can be hundreds of megabytes quite easily, and multi-gigabyte files (eg feature-length high-resolution movies) are not unthinkable. While it should be possible in principle to handle a really huge incoming data file in the stream, currently it'll be buffered up into memory, requiring *at least* ~2.5x the size of the original file for the base64 string, and the decoded binary string before it's written out to a file. This doesn't block working on it as a non-default experimental feature, but it's worth looking out for... especially if it turns out that XMLReader will try to batch up an entire multi-hundred-megabyte string into one node's 'value' property or something, it may be hard to actually read the value in a streaming way. _______________________________________________ MediaWiki-CodeReview mailing list mediawiki-coderev...@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-codereview