token.py 298 Bytes
#! /usr/bin/env python
# -*- coding: utf-8 -*-
# __author__ = "chenwei"
# Date: 2018/11/20

from utils.base import APIView
from gm_upload import get_video_upload_token


class QiniuToken(APIView):

    def get(self, request):
        return {
            'token': get_video_upload_token()
        }