예제 #1
0
def get_qn_upload_user_icon_url(request):
    """
    七牛云存储接口,获取上传项目图标的url
    by: 范俊伟 at:2015-04-08
    :param request:
    :param project_id:
    :return:
    """
    from nsbcs.views_bcsfile import create_user_icon_fileobj
    fileobj = create_user_icon_fileobj(request,bucket=QN_FRIENDS_ICON_BUCKET)
    return getResult(True, u'', {'fileid': fileobj.pk, 'posturl': fileobj.get_qn_post_url(), 'params': fileobj.get_qn_params()})
예제 #2
0
def get_upload_user_icon_url(request):
    """
    获取上传项目图标的url
    by:王健 at:2015-1-28
    上传到七牛
    by: 范俊伟 at:2015-04-14
    修改 获取url的函数,无需参数
    by: 王健 at:2015-04-14
    :param request:
    :param project_id:
    :return:
    """
    from nsbcs.views_bcsfile import create_user_icon_fileobj
    fileobj = create_user_icon_fileobj(request)
    return getResult(True, u'', {'fileid': fileobj.pk, 'posturl': fileobj.get_post_url(), 'puturl': fileobj.get_put_url()})
예제 #3
0
파일: views_user.py 프로젝트: cash2one/ESNS
def get_qn_upload_user_icon_url(request):
    """
    七牛云存储接口,获取上传项目图标的url
    by: 范俊伟 at:2015-04-08
    :param request:
    :param project_id:
    :return:
    """
    from nsbcs.views_bcsfile import create_user_icon_fileobj
    fileobj = create_user_icon_fileobj(request, bucket=QN_FRIENDS_ICON_BUCKET)
    return getResult(
        True, u'', {
            'fileid': fileobj.pk,
            'posturl': fileobj.get_qn_post_url(),
            'params': fileobj.get_qn_params()
        })
예제 #4
0
파일: views_user.py 프로젝트: cash2one/ESNS
def get_upload_user_icon_url(request):
    """
    获取上传项目图标的url
    by:王健 at:2015-1-28
    上传到七牛
    by: 范俊伟 at:2015-04-14
    修改 获取url的函数,无需参数
    by: 王健 at:2015-04-14
    :param request:
    :param project_id:
    :return:
    """
    from nsbcs.views_bcsfile import create_user_icon_fileobj
    fileobj = create_user_icon_fileobj(request)
    return getResult(
        True, u'', {
            'fileid': fileobj.pk,
            'posturl': fileobj.get_post_url(),
            'puturl': fileobj.get_put_url()
        })