django-suuze-upload
=========
|Build Status|
django-suuze-upload is a simple app that allows you to get suuze private file upload services
uptoken. Using this uptoken you can easily upload file with js-sdk in your project.
============
Requirements
============
* `Django <https://www.djangoproject.com/>`_ (1.9+)
* `requests <http://docs.python-requests.org/en/master/>`_ (2.11.1+)
============
Installation
============
* Install ``django-suuze-upload`` (or `download from PyPI <>`_):
.. code-block:: python
pip install django-suuze-upload -i http://p.int.cdnzz.net:19883/simple/
* Add ``django_suuze_upload`` to ``INSTALLED_APPS`` in ``settings.py``:
.. code-block:: python
INSTALLED_APPS = (
# other apps
"django_suuze_upload",
)
* Configure your queues in django's ``settings.py``
.. code-block:: python
SUUZE_UPLOAD_CONFIG = {
# domain provide upload file service
'domain': 'http://upload-file.cdnzz.com',
# web app namn
'app': 'upload-file-demo',
# direction where holds uploaded file
'path': 'app/upload',
# access_key to generate uptoken
'access_key': 'xxxxxxxx',
# optional, in second, default is 1800
# 'expire': 1800,
}
=====
Usage
=====
Fetch uptoken in your project
-------------------------
`django-suuze-upload` allows you to upload file to suuze file store easily.
.. code-block:: python
from django.views import View
from django_suuze_upload import fetch_uptoken
from django_suuze_upload import is_uptoken_expire
from django_suuze_upload import upload_file
class Dome(View):
def post(self, request):
...
uptoken = fetch_uptoken()['uptoken']
....
# some logic to process upload file .etc
# check uptoken is expire or not
# is_uptoken_expire(uptoken)
file_object = request.FILES['filw']
rv = upload_file(uptoken, file_object)
....
Metadata
Release files for django-suuze-upload 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| django-suuze-upload-0.1.1.tar.gz | 3.5 kB | Without provenance | Details for django-suuze-upload-0.1.1.tar.gz |
Release files / django-suuze-upload-0.1.1.tar.gz
| Download URL | django-suuze-upload-0.1.1.tar.gz |
|---|---|
| Size | 3.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c05684724fc0176ae9d69f29770ae29560a1ce4a8c96a7475a25d384b22aab6c
|
|
BLAKE2b-256 checksum How to use checksums |
96de01ffa42e12c3c60c0ec868a7c186f47be7f2a9021c187e56d752f27df90f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for django-suuze-upload 0.1.1
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.