-
Notifications
You must be signed in to change notification settings - Fork 333
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
裁剪图片的ajax不能提交 #14
Comments
我已经解决了, 因为默认的photo属性长度限制的问题 |
good
TQCAI <[email protected]> 于2019年3月2日周六 下午11:53写道:
… <script type="text/javascript" src= "{% static 'js/csrf.js'%}"></script>
$('#btnCrop').on('click', function(){
//alert("图片上传喽");
$.ajax({
url: '{% url "account:my_image" %}',
type: 'POST',
data: {"img": img},
success: function(e){
location.href= "{% url 'account:my_information' %}" },
});
});
按照教程, 但是点击OK后仍然不能提交
我已经解决了, 因为默认的photo属性长度限制的问题
在account/model.py中
photo=models.ImageField(blank=True,max_length=10000)
解决
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#14 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ADel63Gqs8d0umJTj1zVoV8n5yicSFuAks5vSp6SgaJpZM4backP>
.
--
*QiWei*
|
但是我设置了15000,终端没报错,但显示的头像都只是一小部分不能全部显示,是什么原因? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
按照教程, 但是点击OK后仍然不能提交
The text was updated successfully, but these errors were encountered: