{ "info": { "author": "Jarrett Keifer", "author_email": "jkeifer0@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "drf-chunked-upload\n==================\n\nThis simple django app enables users to upload large files to Django\nRest Framework in multiple chunks, with the ability to resume if the\nupload is interrupted.\n\nThis app is based to a large degree on the work of `Julio\nMalegria `__, specifically his\n`django-chunked-upload\napp `__.\n\nLicense: `MIT-Zero `__.\n\nInstallation\n------------\n\nInstall via pip:\n\n::\n\n pip install drf-chunked-upload\n\nAnd then add it to your Django ``INSTALLED_APPS``:\n\n::\n\n INSTALLED_APPS = (\n # ...\n 'drf_chunked_upload',\n )\n\nTypical usage\n-------------\n\n1. An initial PUT request is sent to the url linked to\n ``ChunkedUploadView`` (or any subclass) with the first chunk of the\n file. The name of the chunk file can be overriden in the view (class\n attribute ``field_name``). Example:\n\n.. code:: python\n\n {\"my_file\": file}\n\n2. In return, the server will respond with the ``url`` of the upload,\n the current ``offset``, and when the upload will expire\n (``expires``). Example:\n\n::\n\n {\n \"url\": \"https://your-host//5230ec1f59d1485d9d7974b853802e31\",\n \"offset\": 10000,\n \"expires\": \"2013-07-18T17:56:22.186Z\"\n }\n\n3. Repeatedly PUT subsequent chunks to the ``url`` returned from the\n server. Example:\n\n.. code:: python\n\n # PUT to https://your-host//5230ec1f59d1485d9d7974b853802e31\n\n {\n \"my_file\": file\n }\n\n4. Server will continue responding with the ``url``, current ``offset``\n and expiration (``expires``).\n\n5. Finally, when upload is completed, POST a request to the returned\n ``url``. This request must include the ``md5`` checksum (hex) of the\n entire file. Example:\n\n.. code:: python\n\n # POST to https://your-host//5230ec1f59d1485d9d7974b853802e31\n\n {\n \"md5\": \"fc3ff98e8c6a0d3087d515c0473f8677\"\n }\n\n6. If everything is OK, server will response with status code 200 and\n the data returned in the method ``get_response_data`` (if any).\n\n7. If you want to upload a file as a single chunk, this is also\n possible! Simply make the first request a POST and include the md5\n for the file. You don't need to include the ``Content-Range`` header\n if uploading a whole file.\n\n**Possible error responses:**\n\n- Upload has expired. Server responds 410 (Gone).\n- ``id`` does not match any upload. Server responds 404 (Not found).\n- No chunk file is found in the indicated key. Server responds 400 (Bad\n request).\n- Request does not contain ``Content-Range`` header. Server responds\n 400 (Bad request).\n- Size of file exceeds limit (if specified). Server responds 400 (Bad\n request).\n- Offsets does not match. Server responds 400 (Bad request).\n- ``md5`` checksums does not match. Server responds 400 (Bad request).\n\nSettings\n--------\n\nAdd any of these variables into your project settings to override them.\n\n``DRF_CHUNKED_UPLOAD_EXPIRATION_DELTA``\n\n- How long after creation the upload will expire.\n- Default: ``datetime.timedelta(days=1)``\n\n``DRF_CHUNKED_UPLOAD_PATH``\n\n- Path where uploaded files will be stored.\n- Default: ``'chunked_uploads/%Y/%m/%d'``\n\n``DRF_CHUNKED_UPLOAD_COMPLETE_EXT``\n\n- Extension to use for completed uploads. Uploads will be renamed using\n this extension on completion, unless this extension matched\n DRF\\_CHUNKED\\_UPLOAD\\_INCOMPLETE\\_EXT.\n- Default: ``'.done'``\n\n``DRF_CHUNKED_UPLOAD_INCOMPLETE_EXT``\n\n- Extension for in progress upload files.\n- Default: ``'.part'``\n\n``DRF_CHUNKED_UPLOAD_STORAGE_CLASS``\n\n- Storage system (should be a class)\n- Default: ``None`` (use default storage system)\n\n``DRF_CHUNKED_UPLOAD_USER_RESTRICED``\n\n- Boolean that determines whether only the user who created an upload\n can view/continue an upload.\n- Default: ``True``\n\n``DRF_CHUNKED_UPLOAD_ABSTRACT_MODEL``\n\n- Boolean that defines if the ``ChunkedUpload`` model will be abstract\n or not (`what does abstract model\n mean? `__).\n- Default: ``True``\n\n``DRF_CHUNKED_UPLOAD_MAX_BYTES``\n\n- Max amount of data (in bytes) that can be uploaded. ``None`` means no\n limit.\n- Default: ``None``\n\nSupport\n-------\n\nIf you find any bug or you want to propose a new feature, please use the\n`issues\ntracker `__. Pull\nrequests are also accepted.\n", "description_content_type": "", "docs_url": null, "download_url": "https://github.com/jkeifer/drf-chunked-upload/tarball/0.4.2", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/jkeifer/drf-chunked-upload", "keywords": "", "license": "MIT-Zero", "maintainer": "", "maintainer_email": "", "name": "drf-chunked-upload", "package_url": "https://pypi.org/project/drf-chunked-upload/", "platform": "", "project_url": "https://pypi.org/project/drf-chunked-upload/", "project_urls": { "Download": "https://github.com/jkeifer/drf-chunked-upload/tarball/0.4.2", "Homepage": "https://github.com/jkeifer/drf-chunked-upload" }, "release_url": "https://pypi.org/project/drf-chunked-upload/0.4.2/", "requires_dist": null, "requires_python": "", "summary": "Upload large files to Django REST Framework in multiple chunks, with the ability to resume if the upload is interrupted.", "version": "0.4.2" }, "last_serial": 3879499, "releases": { "0.2.1": [ { "comment_text": "", "digests": { "md5": "af2461fb48271ec435b514a7861d4139", "sha256": "2598ff2be7a3542be38c182d7b87ac38fbfd0d891bd505fa26a1310d43ae6b36" }, "downloads": -1, "filename": "drf-chunked-upload-0.2.1.tar.gz", "has_sig": false, "md5_digest": "af2461fb48271ec435b514a7861d4139", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13341, "upload_time": "2017-03-01T05:06:18", "url": "https://files.pythonhosted.org/packages/b0/a8/5f7d228f259322717eba3d6104267b689b5b5f960145d572ff82f90c6878/drf-chunked-upload-0.2.1.tar.gz" } ], "0.2.2": [ { "comment_text": "", "digests": { "md5": "a91d4b2c2399d91cf2f0dc3f3fe1f650", "sha256": "3a92fb157cee33030df90b82cc286e01c6158e10f954228665cf21635a6a9869" }, "downloads": -1, "filename": "drf-chunked-upload-0.2.2.tar.gz", "has_sig": false, "md5_digest": "a91d4b2c2399d91cf2f0dc3f3fe1f650", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13584, "upload_time": "2017-04-10T01:12:45", "url": "https://files.pythonhosted.org/packages/6e/6c/dc65585013432a96f7b6b0d205aa38b032b64e81e408c41bb23adc7ab0b4/drf-chunked-upload-0.2.2.tar.gz" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "16cbafac8642cd96c6bc7b9d684b382b", "sha256": "91431c0151dafe963f612caf9a2bb6359895f2873d9c8a470d5102ddf2002a5c" }, "downloads": -1, "filename": "drf-chunked-upload-0.3.0.tar.gz", "has_sig": false, "md5_digest": "16cbafac8642cd96c6bc7b9d684b382b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13589, "upload_time": "2017-04-23T21:03:10", "url": "https://files.pythonhosted.org/packages/a5/2c/051ccd74bae67bbae8d34cff260fa5908129cc7711df76e3732ca04da558/drf-chunked-upload-0.3.0.tar.gz" } ], "0.4.2": [ { "comment_text": "", "digests": { "md5": "fae39f18286144a3aa542632437ff7cc", "sha256": "1eaa4a2bb0e998ce7fb9dd9033a395f9e04bc547b7bc43b615ce595da0d05a98" }, "downloads": -1, "filename": "drf-chunked-upload-0.4.2.tar.gz", "has_sig": false, "md5_digest": "fae39f18286144a3aa542632437ff7cc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13638, "upload_time": "2018-05-19T17:52:33", "url": "https://files.pythonhosted.org/packages/4c/8c/6f803602303402ec5936257145d87f0cd8a474a38e3bb104d15d401142b7/drf-chunked-upload-0.4.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "fae39f18286144a3aa542632437ff7cc", "sha256": "1eaa4a2bb0e998ce7fb9dd9033a395f9e04bc547b7bc43b615ce595da0d05a98" }, "downloads": -1, "filename": "drf-chunked-upload-0.4.2.tar.gz", "has_sig": false, "md5_digest": "fae39f18286144a3aa542632437ff7cc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13638, "upload_time": "2018-05-19T17:52:33", "url": "https://files.pythonhosted.org/packages/4c/8c/6f803602303402ec5936257145d87f0cd8a474a38e3bb104d15d401142b7/drf-chunked-upload-0.4.2.tar.gz" } ] }