Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/351.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 通过链接安装apk_Python_Django_Web_Installation_Apk - Fatal编程技术网

Python 通过链接安装apk

Python 通过链接安装apk,python,django,web,installation,apk,Python,Django,Web,Installation,Apk,我尝试确保当您打开链接开始安装时,无需下载apk。 互联网通过一个代码发现了一定数量的信息: path = os.path.join(build.project.path, build.upload_file_identifier + '.' + build.extentions) file = open(path, 'rb') response = HttpResponse(file, content_type='application/vnd.android.package-archive

我尝试确保当您打开链接开始安装时,无需下载apk。 互联网通过一个代码发现了一定数量的信息:

path = os.path.join(build.project.path, build.upload_file_identifier + '.' + build.extentions)
file = open(path, 'rb')

response = HttpResponse(file, content_type='application/vnd.android.package-archive')
response['Content-Length'] = os.path.getsize(path)
response['Content-Disposition'] = 'attachment'.format(
    translit(build.name.replace(' ', '_'), 'ru', reversed=True),
    build.number,
    build.build_type)

return response
问题是,当你打开链接开始下载

可以做些什么来启动安装吗