title: File content to Blob string conversion
body: <p>I need to create an issue with attachement in MantisBT via REST API like it's written here : 
  <a href="https://documenter.getpostman.com/view/29959/mantis-bug-tracker-rest-api/7Lt6zkP?version=latest#2d3878c7-4195-42f7-53b7-9cc11f7501f4" rel="nofollow noreferrer">https://documenter.getpostman.com/view/29959/mantis-bug-tracker-rest-api/7Lt6zkP?version=latest#2d3878c7-4195-42f7-53b7-9cc11f7501f4</a></p>
  
  <p>How can i transform a local text file content into a blob string ?</p>
  
  <p>I'm running on Linux CentOS 7 and need to do it locally without using any browser or human interaction, just fully automated.</p>
  
  <p>I made a little Python script that store the file content in a json attribute but i need to have the BLOB representation of this content.</p>
  
  <pre><code>import json 
  
  reportpath = '/var/lib/jenkins/jobs/SimplePipeline/workspace/reports/CompilationReport.txt'
  
  compilReportFile = open(reportpath, 'r')
  compilContent = compilReportFile.read()
  compilReportFile.close()
  
  with open('/home/Jenkins/PFE/Static/newMantisRequestBody.json', 'r') as file:
       json_data = json.load(file)
       json_data["description"] = compilContent
  with open('/home/Jenkins/PFE/Static/newMantisRequestBody.json', 'w') as file:
      json.dump(json_data, file, indent=2)
  </code></pre>
  
  <p>I expect to end with something like this :</p>
  
  <pre><code>"files": [
          {
              "name": "test.txt",
              "content": "VGhpcyBpcyBhIFRFU1QuDQpUaGlzIGlzIGEgVEVTVC4NClRoaXMgaXMgYSBURVNULg0KVGhpcyBpcyBhIFRFU1QuDQpUaGlzIGlzIGEgVEVTVC4="
          }
      ]
  </code></pre>
  
  <p>Or, now i'm only able to do this :</p>
  
  <pre><code>  "description": "MY FILE CONTENT STRING HERE"
  </code></pre>
  
  <p>Do you guys have an idea ?</p>
  
  <p>Thanks !</p>