{"id":21933516,"url":"https://github.com/aidenellis/djangoupstoragebackend","last_synced_at":"2026-05-06T21:34:02.135Z","repository":{"id":57422501,"uuid":"345618894","full_name":"AidenEllis/DjangoUpStorageBackend","owner":"AidenEllis","description":null,"archived":false,"fork":false,"pushed_at":"2021-05-11T04:42:36.000Z","size":91,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-27T12:49:50.285Z","etag":null,"topics":["aidenellis","backend","django","upstorage"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AidenEllis.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-03-08T10:35:06.000Z","updated_at":"2021-12-17T11:43:43.000Z","dependencies_parsed_at":"2022-09-13T17:14:19.251Z","dependency_job_id":null,"html_url":"https://github.com/AidenEllis/DjangoUpStorageBackend","commit_stats":null,"previous_names":["quackcoding/djangoupstoragebackend"],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AidenEllis%2FDjangoUpStorageBackend","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AidenEllis%2FDjangoUpStorageBackend/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AidenEllis%2FDjangoUpStorageBackend/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AidenEllis%2FDjangoUpStorageBackend/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AidenEllis","download_url":"https://codeload.github.com/AidenEllis/DjangoUpStorageBackend/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244961431,"owners_count":20538963,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aidenellis","backend","django","upstorage"],"created_at":"2024-11-29T00:12:19.792Z","updated_at":"2026-05-06T21:34:02.092Z","avatar_url":"https://github.com/AidenEllis.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"## django-upstorage-backend\n\nThis is a custom django storage backend for `UpStorage`\n\n## Installation\n1. Install Library Using `pip`\n````shell script\n\u003e\u003e pip install django-upstorage-backend\n````\n\n## Starting Guide\n\n1. Set The Custom Storage Backend. Now Open settings.py of your project.\n````python\nDEFAULT_FILE_STORAGE = 'django-upstorage-backend.storages.backends.U3Storage'\n````\n\n2. Set some required KEYS to `settings.py`\n````python\nAUTH_TOKEN = 'auth token from your account'\nAPI_KEY = 'api key of your project'\nUSERNAME = 'username of your account'\nPROJECT_NAME = 'Created Project name'\n````\n\nThats it, We are all done. Now all of your files will be handeled by the custom UpStorage's Backend Storage.\n\n\n## Advanced Guide\n\n* `You don't need to set 'upload_to' in model Fields (Defaultly it files will be saved on the root of your project.)`\n\n* `File Link Will Be Stored On Your Model As Expected.You Can call them as you do usally.`\n\n* `You Can also set 'upload_to='specific/folder' in your model like:`\n   ````python\n  Class TestModel(model.Model):\n      image = models.ImageField(upload_to='to/my/folder')\n  \n  # this will save the file to that folder.if there's no folder it will create it.\n  ````\n\n* `If you want to delete the image from the UpStorage Bucket when you delete it from django, you have to do it a bit differently.Lemme show you`\n   ````python\n  Class TestModel(model.Model):\n      image = models.ImageField()\n  \n  # To delete the image you have to delete that by writing:\n  \n  obj = TestModel.objects.get(id=pk)\n  obj.image.delete()\n  \n  # You can't directly delete it like this:\n  \n  obj.delete() # this won't delete the file from UpStorage\n  \n  # You have to delete the file field first to delete it.\n  ````\n  To make it simple you can override `delete` Method on your Model\n  \n  ````python\n  Class TestModel(model.Model):\n      image = models.ImageField()\n  \n      def delete(self):\n          self.image.delete()\n          super(TestModel, self).delete()\n  ````\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faidenellis%2Fdjangoupstoragebackend","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faidenellis%2Fdjangoupstoragebackend","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faidenellis%2Fdjangoupstoragebackend/lists"}