What property of the Drupal Rest API in a JSON request controls the state logic of the Drupal file (temporary and permanent)?
I am trying to upload via Multipart / form-data strong> (ie JSON data plus the attached [uploaded] file) to the Drupal 8.1.x CMS. So far, the download has been successful. However, in Drupal, downloaded files (via REST) ββare initially stored by default with the status "TEMPORARY".
I want to tell Drupal to set the file status to "PERMANENT" when it stores my file in Drupal CMS. I did some searching and found out that the βstatusβ keyword in File.php did the magic around TEMPORARY and PERMANENT. So far, I have included the "status" property in my Json request, but Drupal generates an Internal error β message:
"Access denied on creating field 'status'"
after setting "status": [{"value": "1"}]
BTW: I tried different options for representing the values ββ"value", that is, "1", 1, "true", "true", ..., since I could not get more information about the API specification regarding the Rest file upload interface .
I searched the Drupal site for a solution, but have not yet received satisfactory results.
: - , JSON PERMANENT?