code: def uploader(func):
          
  
          @wraps(func)
          def wrapper(*args, **kwargs):
              func_num = request.args.get('CKEditorFuncNum')
              # ckeditor = request.args.get('CKEditor')
              # language code used for error message, not used yet.
              # lang_code = request.args.get('langCode')
              # the error message to display when upload failed.
              message = current_app.config['CKEDITOR_UPLOAD_ERROR_MESSAGE']
              url = func(*args, **kwargs)
              return Markup('''<script type="text/javascript">
          window.parent.CKEDITOR.tools.callFunction(%s, "%s", "%s");</script>''' % (func_num, url, message))
  
          return wrapper
docs: This method only used for CKEditor under version 4.5, in newer version,
          you should use ``upload_success()`` and ``upload_fail()`` instead.
  
          Decorated the view function that handle the file upload. The upload
          view must return the uploaded image's url. For example::
  
              from flask import send_from_directory
  
              app.config['CKEDITOR_FILE_UPLOADER'] = 'upload'  # this value can be endpoint or url
  
  
              @app.route('/files/<filename>')
              def uploaded_files(filename):
                  path = '/the/uploaded/directory'
                  return send_from_directory(path, filename)
  
              @app.route('/upload', methods=['POST'])
              @ckeditor.uploader
              def upload():
                  f = request.files.get('upload')
                  f.save(os.path.join('/the/uploaded/directory', f.filename))
                  url = url_for('uploaded_files', filename=f.filename)
                  return url
  
          .. versionadded:: 0.3