Closed Maxino22 closed 3 years ago
This is more a general Flask question then a specific question about Flask-CKeditor. So you might want to ask your question in a dedicated Flask forum.
However, we can take a look of course, but we need more information. Could you share the template you are using and the code that builds the form?
Thanks for response , This is the template for my form
{% extends 'admin/base.html' %}
{% block title %}
Add Post
{% endblock %}
{% block content %}
<div class="container">
<div class="row">
<div class="col-lg-12 mt-4">
<form method="POST" enctype ="multipart/form-data">
{{form.csrf_token}}
<div class="form-group">
<label for="title">Title</label>
{{form.title(class="form-control")}}
</div>
<div class="form-group">
<label for="category">Category</label>
<select name="category_id" class="form-control">
{% for category in categories %}
<option value={{category.id}}>{{category.name}}</option>
{% endfor %}
</select>
</div>
<div class="form-group">
<label for="file">Image Upload</label>
{{form.picture(class="form-control-file")}}
<small class="form-text text-muted">Max Size 3mb</small>
</div>
<div class="form-group">
<label for="body">Body</label>
{{form.text(class="form-control")}}
</div>
{{form.submit(class="btn btn-primary")}}
</form>
{{ckeditor.load(custom_url=url_for('static', filename='ckeditor/ckeditor.js'))}}
{{ckeditor.config(name="text")}}
</div>
</div>
</div>
{% endblock %}
Please provide the full error traceback (whenever you ask a question about an error, be sure always to include the full error traceback).
The screenshot is not helpful, and it's not the full error traceback, you could copy the plaintext of error trackback from your terminal.
I have used flask uploads and found away around it using only the image link thank you for your time and interest to help me
I have set up everything as per documentation and example but i am getting this error. below is my route that handles the image upload the jinja error is on the f.filename.split. Kindly assist