Skip to main content

django-uuid-upload

Library for Django that automatically stores uploaded files as mydir/{uuid}.jpg or mydir/{uuid}/original.jpg.

Installation

pip install django-uuid-upload

Usage

from django.db import models
from django_uuid_upload import upload_to_uuid

class Post(models.Model):
        # Store uploaded files as posts/{uuid}.jpg
        image = models.ImageField(upload_to=upload_to_uuid('posts'))

        # Or, store uploaded files as posts/{uuid}/original.jpg
        image = models.ImageField(upload_to=upload_to_uuid('posts', make_dir=True))

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-uuid-upload-1.0.0.tar.gz (1.5 kB view details)

Uploaded Source

File details

Details for the file django-uuid-upload-1.0.0.tar.gz.

File metadata

  • Download URL: django-uuid-upload-1.0.0.tar.gz
  • Upload date:
  • Size: 1.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: Python-urllib/2.7

File hashes

Hashes for django-uuid-upload-1.0.0.tar.gz
Algorithm Hash digest
SHA256 5c62fd45bbff90e0f4444f8ff0b5fafb4b51d725f26d5ff749263db33f04934e
MD5 4f13bcac8b8f4ea5fe209e51989dcc91
BLAKE2b-256 6976e65b50e15b4f96215ad67bf4e3d63afc6bbe2fb8a21b8902163e60169405

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.0.0 This release

1 file

0.0.2

1 file

0.0.1

1 file

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page