settings.py import os # Build paths inside the project like this: os.path.join(BASE_DIR, ...) BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) # Quick-start development settings - unsuitable for production # See https://docs.dja…
没什么 说的 直接 上代码 //选择图片并上传 function selectImg(node){ var f = node.value; var file = node.files[0]; if(!/.(gif|jpg|jpeg|png|GIF|JPG|bmp)$/.test(f)){ alert("图片类型必须是.gif,jpeg,jpg,png,bmp中的一种"); return false; }else{ var reader = new FileReader(); if (…