Trying to post a file entity that have fields adds the file but fails to write field data on the file entity. For example, I have a file entity with an field called alt_text. When I post a file to the file resource create endpoint I get the file created but the field value fails to save.
Example post:

{
	"file": "somebase64data",
	"filename": "images.jpg",
	"field_file_image_alt_text": {
		"en": [{
			"value": "test",
		}]
	}
}

Patch attached.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

awm created an issue. See original summary.

awm’s picture

Issue summary: View changes
awm’s picture

Status: Active » Needs review
awm’s picture

updating the patch file name to adhere with standards.

tyler.frankenstein’s picture

This looks good, thank you. I can personally RTBC this pretty soon, as I suspect I'll need this patch for a ongoing project. Until then, if we can get 1 or 2 others to RTBC it, we'll get this committed.

Samvel’s picture

Status: Needs review » Reviewed & tested by the community

Hi @tyler.frankenstein and @awm.
I reviewed patch on fresh drupal installation and test this issue. Patch working, and i can set RTBC to it.
Thank you for your work. I hope it will be committed.