{ "info": { "author": "Godefroid Chapelle", "author_email": "gotcha@bubblenet.be", "bugtrack_url": null, "classifiers": [ "Environment :: Web Environment", "Framework :: Plone", "Framework :: Plone :: 4.3", "Programming Language :: Python", "Programming Language :: Python :: 2.7" ], "description": "=========================\ncollective.updatemimetype\n=========================\n\nThis Plone add-on can be used to update broken mimetypes of Blob fields.\n\nWhen a file or an image is uploaded to a Blob field, its mimetype is computed\nbased on information from the ``mimetypes_registry``.\n\nIf that registry misses some information, the computed mimetype can be wrong\nor too general.\n\nFor instance, prior to version 2.0.7 of ``Products.MimetypeRegistry``, \nthe default ``mimetypes_registry`` of a Plone portal did not\nknow of OpenXML mimetypes. Those files would get ``application/zip``\nmimetype instead of their proper mimetypes.\n\nAs computation of mimetype happens only at load time, upgrading\n``Products.MimetypeRegistry`` is not enough to fix broken mimetypes.\n\nThe function ``collective.updatemimetype.migrate`` walks over content, looks\nfor blob fields that would get different mimetype if they would be uploaded again,\nand updates those field mimetypes.\nIt can be called from a GenericSetup upgrade step with::\n\n from collective.updatemimetype import migrate\n\n migrate(portal)\n\n.. CAUTION::\n The update can demand a lot of memory and take a long time if your portal holds\n a lot of content.\n\nIf you want to limit migration to specific content items, you can pass a ``query``\nargument to the ``migrate`` function. For instance, while the code above updates both ``File``\nand ``Image`` content items of a default Plone site, the code below would\nonly update ``File`` content items::\n\n from collective.updatemimetype import migrate\n\n catalog_query = {'portal_type': 'File'}\n\n migrate(portal, catalog_query)\n\n\nThere is also a view registered on the portal. Call it with::\n\n http://my_domain/my_portal/updatemimetype\n\nThe view can also be called with a ``query`` parameter. To limit update to\n``File`` items, call the view with::\n\n http://my_domain/my_portal/updatemimetype?query.portal_type:record:string=File\n\n\nContributors\n============\n\n- Godefroid Chapelle, gotcha@bubblenet.be, funded by KULeuven\n\nChangelog\n=========\n\n\n0.1.2 (2015-07-06)\n------------------\n\n- Fix limiting update to the results of a catalog query.\n And document how to do it.\n [gotcha]\n\n\n0.1.1 (2015-06-30)\n------------------\n\n- Fix classifier\n [gotcha]\n\n\n0.1 (2015-06-29)\n----------------\n\n- Initial release.\n [gotcha]", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://pypi.python.org/pypi/collective.updatemimetype", "keywords": "Python Plone", "license": "GPL", "maintainer": null, "maintainer_email": null, "name": "collective.updatemimetype", "package_url": "https://pypi.org/project/collective.updatemimetype/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/collective.updatemimetype/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://pypi.python.org/pypi/collective.updatemimetype" }, "release_url": "https://pypi.org/project/collective.updatemimetype/0.1.2/", "requires_dist": null, "requires_python": null, "summary": "Plone addon to fix Archetypes file field mimetypes", "version": "0.1.2" }, "last_serial": 1620721, "releases": { "0.1.1": [ { "comment_text": "", "digests": { "md5": "5bf56c63d47e185da7794cf8c5243c24", "sha256": "b5ded38f6f7a604ff334cdfe064db11c03a4837a05c54ea7f4c9514fd649852b" }, "downloads": -1, "filename": "collective.updatemimetype-0.1.1.zip", "has_sig": false, "md5_digest": "5bf56c63d47e185da7794cf8c5243c24", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 27056, "upload_time": "2015-06-30T08:36:04", "url": "https://files.pythonhosted.org/packages/fc/93/6e2421208eb09072d7da2d61ac1c38d60c413c0b4120a576885121062dda/collective.updatemimetype-0.1.1.zip" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "d5371e5e7552ebf5fef5aa70124bf325", "sha256": "6e846dfa9bc01a2cea65349933d91a77cde09baf7d0b7dcb38970ca4b42acf19" }, "downloads": -1, "filename": "collective.updatemimetype-0.1.2.zip", "has_sig": false, "md5_digest": "d5371e5e7552ebf5fef5aa70124bf325", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 27891, "upload_time": "2015-07-06T07:37:20", "url": "https://files.pythonhosted.org/packages/c1/52/4ea82bbe44d6cfc40d539aee7e401961ea6b393b331304773eb73ca2703f/collective.updatemimetype-0.1.2.zip" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "d5371e5e7552ebf5fef5aa70124bf325", "sha256": "6e846dfa9bc01a2cea65349933d91a77cde09baf7d0b7dcb38970ca4b42acf19" }, "downloads": -1, "filename": "collective.updatemimetype-0.1.2.zip", "has_sig": false, "md5_digest": "d5371e5e7552ebf5fef5aa70124bf325", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 27891, "upload_time": "2015-07-06T07:37:20", "url": "https://files.pythonhosted.org/packages/c1/52/4ea82bbe44d6cfc40d539aee7e401961ea6b393b331304773eb73ca2703f/collective.updatemimetype-0.1.2.zip" } ] }