Skip to main content

Django Multiupload Plus ⏩

🍴 This is a forked and updated version based on original library django-multiupload.

As for 31.12.2024 nobody took responsibility, so I decided to take it since we need that fix in one of our project.

Dead simple drop-in multi file upload field for django forms using HTML5's multiple attribute.

To keep Django ecosystem fresh and updated, please share your love and support, click Star 🫶

Installation

  • Install the package using pip
$ pip install django-multiupload-plus

Usage

Add the form field to your form and make sure to save the uploaded files in the form's save method.

For more detailed examples visit the examples section.

# forms.py
from django import forms
from multiupload_plus.fields import MultiFileField, MultiMediaField, MultiImageField

class UploadForm(forms.Form):
    attachments = MultiFileField(min_num=1, max_num=3, max_file_size=1024*1024*5)

    # If you need to upload media files, you can use this:
    attachments = MultiMediaField(
        min_num=1,
        max_num=3,
        max_file_size=1024*1024*5,
        media_type='video'  # 'audio', 'video' or 'image'
    )

    # For images (requires Pillow for validation):
    attachments = MultiImageField(min_num=1, max_num=3, max_file_size=1024*1024*5)

The latter two options just add fancy attributes to HTML's <input>, restricting the scope to corresponding filetypes.

# models.py
from django.db import models

class Attachment(models.Model):
    file = models.FileField(upload_to='attachments')
# views.py
from django.views.generic.edit import FormView
from .forms import UploadForm
from .models import Attachment

class UploadView(FormView):
    template_name = 'form.html'
    form_class = UploadForm
    success_url = '/done/'

    def form_valid(self, form):
        for each in form.cleaned_data['attachments']:
            Attachment.objects.create(file=each)
        return super().form_valid(form)

Metadata

Release files for django-multiupload-plus 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-multiupload-plus 0.1.0
File Size Uploaded Provenance Actions
django_multiupload_plus-0.1.0.tar.gz 6.6 kB Without provenance Details for django_multiupload_plus-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for django-multiupload-plus 0.1.0
File Interpreter ABI Platform Actions
django_multiupload_plus-0.1.0-py3-none-any.whl Python 3 none any Details for django_multiupload_plus-0.1.0-py3-none-any.whl

Total release size: 14.3 kB

Release files / django_multiupload_plus-0.1.0.tar.gz

Download URL django_multiupload_plus-0.1.0.tar.gz
Size 6.6 kB
Tags Source
SHA-256 checksum
How to use checksums
83cf0e95b17bca5a1d9bc841bf9ecba4ea90b568f164d3fe3617b3db2d3cb34c
BLAKE2b-256 checksum
How to use checksums
47f83be82cd59a52af175ba84338f62d1223d2e520bcd85333c99b060c8f1b03
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.12.4

Release files / django_multiupload_plus-0.1.0-py3-none-any.whl

Download URL django_multiupload_plus-0.1.0-py3-none-any.whl
Size 7.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
dc85957465810bd4d317ea497dd74219261cca5254a0369e574fb5777cfdc441
BLAKE2b-256 checksum
How to use checksums
c9fbf7389346c55a7261b24fd0f2ed2feb6052c9ece02e32b40490742b07da2e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.12.4

Security for django-multiupload-plus 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page