Upload image to database in xblock

How I can upload image to database in xblock.
I tried adding it when the javascrpt and send it python by ajax but it seems doesn’t work
A,y help please
I’m nw on xblock development

Hi @seni,
some XBlocks already have this functionality implemented. You could use them as a reference:

  1. Open Response Assessment (repository).
  2. Staff Graded Assignment.