Summary
When trying to upload a file (image, audio file, etc.) via JSON:API and using the alias like this:
https://www.example.com/jsonapi/user/user/UUID/myJsonApiFileFieldAlias
Then the upload will fail with a "page not found" error.
This is a known issue with JSON:API in core and needs to be fixed there first; this issue will be updated once the core fix is in.
As a workaround, just use the actual name of the file field, not the alias, and uploading will work correctly.
Original issue report
When a new alias is added for an image field on Resource Overrides page (/admin/config/services/jsonapi/resource_types/node--project/edit) the route does not appear to have been created properly.
e.g: Create an alias for "field_project_beer_label" to be "beer_label
After that if I try to upload a file via Postman using this new url alias (/jsonapi/node/project/beer_label) I get the following the error message (Page not found).
When I try to upload using the field name (field_project_beer_label) debugging the code I see that the route was not created for the alias "beer_label" but the field was changed.
Postman message:
{
"jsonapi": {
"version": "1.0",
"meta": {
"links": {
"self": {
"href": "http://jsonapi.org/format/1.0/"
}
}
}
},
"errors": [
{
"title": "Not Found",
"status": "404",
"detail": "Field \"beer_label\" does not exist.",
"links": {
"via": {
"href": "http://api.p2b.localhost/jsonapi/node/project/beer_label"
},
"info": {
"href": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5"
}
},
"source": {
"file": "/var/www/html/web/core/modules/jsonapi/src/Controller/FileUpload.php",
"line": 236
},
"meta": {
"exception": "Symfony\\Component\\HttpKernel\\Exception\\NotFoundHttpException: Field \"beer_label\" does not exist. in /var/www/html/web/core/modules/jsonapi/src/Controller/FileUpload.php:236\nStack trace:\n#0 /var/www/html/web/core/modules/jsonapi/src/Controller/FileUpload.php(164): Drupal\\jsonapi\\Controller\\FileUpload->validateAndLoadFieldDefinition('node', 'project', 'beer_label')\n#1 [internal function]: Drupal\\jsonapi\\Controller\\FileUpload->handleFileUploadForNewResource(Object(Symfony\\Component\\HttpFoundation\\Request), Object(Drupal\\jsonapi_extras\\ResourceType\\ConfigurableResourceType), 'beer_label')\n#2 /var/www/html/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array(Array, Array)\n#3 /var/www/html/web/core/lib/Drupal/Core/Render/Renderer.php(582): Drupal\\Core\\EventSubscriber\\EarlyRenderingControllerWrapperSubscriber->Drupal\\Core\\EventSubscriber\\{closure}()\n#4 /var/www/html/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(124): Drupal\\Core\\Render\\Renderer->executeInRenderContext(Object(Drupal\\Core\\Render\\RenderContext), Object(Closure))\n#5 /var/www/html/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\\Core\\EventSubscriber\\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array)\n#6 /var/www/html/vendor/symfony/http-kernel/HttpKernel.php(151): Drupal\\Core\\EventSubscriber\\EarlyRenderingControllerWrapperSubscriber->Drupal\\Core\\EventSubscriber\\{closure}()\n#7 /var/www/html/vendor/symfony/http-kernel/HttpKernel.php(68): Symfony\\Component\\HttpKernel\\HttpKernel->handleRaw(Object(Symfony\\Component\\HttpFoundation\\Request), 1)\n#8 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/Session.php(57): Symfony\\Component\\HttpKernel\\HttpKernel->handle(Object(Symfony\\Component\\HttpFoundation\\Request), 1, true)\n#9 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(47): Drupal\\Core\\StackMiddleware\\Session->handle(Object(Symfony\\Component\\HttpFoundation\\Request), 1, true)\n#10 /var/www/html/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(106): Drupal\\Core\\StackMiddleware\\KernelPreHandle->handle(Object(Symfony\\Component\\HttpFoundation\\Request), 1, true)\n#11 /var/www/html/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(85): Drupal\\page_cache\\StackMiddleware\\PageCache->pass(Object(Symfony\\Component\\HttpFoundation\\Request), 1, true)\n#12 /var/www/html/vendor/asm89/stack-cors/src/Asm89/Stack/Cors.php(49): Drupal\\page_cache\\StackMiddleware\\PageCache->handle(Object(Symfony\\Component\\HttpFoundation\\Request), 1, true)\n#13 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(47): Asm89\\Stack\\Cors->handle(Object(Symfony\\Component\\HttpFoundation\\Request), 1, true)\n#14 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(52): Drupal\\Core\\StackMiddleware\\ReverseProxyMiddleware->handle(Object(Symfony\\Component\\HttpFoundation\\Request), 1, true)\n#15 /var/www/html/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Drupal\\Core\\StackMiddleware\\NegotiationMiddleware->handle(Object(Symfony\\Component\\HttpFoundation\\Request), 1, true)\n#16 /var/www/html/web/core/lib/Drupal/Core/DrupalKernel.php(693): Stack\\StackedHttpKernel->handle(Object(Symfony\\Component\\HttpFoundation\\Request), 1, true)\n#17 /var/www/html/web/index.php(19): Drupal\\Core\\DrupalKernel->handle(Object(Symfony\\Component\\HttpFoundation\\Request))\n#18 {main}",
"trace": [
{
"file": "/var/www/html/web/core/modules/jsonapi/src/Controller/FileUpload.php",
"line": 164,
"function": "validateAndLoadFieldDefinition",
"class": "Drupal\\jsonapi\\Controller\\FileUpload",
"type": "->",
"args": [
"node",
"project",
"beer_label"
]
},
{
"function": "handleFileUploadForNewResource",
"class": "Drupal\\jsonapi\\Controller\\FileUpload",
"type": "->",
"args": [
"POST /jsonapi/node/project/beer_label HTTP/1.1\r\nAccept: application/vnd.api+json\r\nAccept-Encoding: gzip, deflate\r\nAuthorization: Basic YWRtaW46YWRtaW4=\r\nCache-Control: no-cache\r\nContent-Disposition: file; filename=\"filename.jpg\"\r\nContent-Length: 0\r\nContent-Type: application/octet-stream\r\nHost: api.p2b.localhost\r\nMod-Rewrite: On\r\nPhp-Auth-Pw: admin\r\nPhp-Auth-User: admin\r\nPostman-Token: 5fdad9f8-c38e-4297-9c0f-68021d811c63\r\nUser-Agent: PostmanRuntime/7.4.0\r\nX-Forwarded-For: 172.30.0.1\r\nX-Forwarded-Host: api.p2b.localhost\r\nX-Forwarded-Port: 80\r\nX-Forwarded-Proto: http\r\nX-Forwarded-Server: 1b09ec69555c\r\nX-Php-Ob-Level: 1\r\nX-Real-Ip: 172.30.0.1\r\n\r\n",
null,
"beer_label"
]
},
{
"file": "/var/www/html/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php",
"line": 123,
"function": "call_user_func_array",
"args": [
[
null,
"handleFileUploadForNewResource"
],
[
"POST /jsonapi/node/project/beer_label HTTP/1.1\r\nAccept: application/vnd.api+json\r\nAccept-Encoding: gzip, deflate\r\nAuthorization: Basic YWRtaW46YWRtaW4=\r\nCache-Control: no-cache\r\nContent-Disposition: file; filename=\"filename.jpg\"\r\nContent-Length: 0\r\nContent-Type: application/octet-stream\r\nHost: api.p2b.localhost\r\nMod-Rewrite: On\r\nPhp-Auth-Pw: admin\r\nPhp-Auth-User: admin\r\nPostman-Token: 5fdad9f8-c38e-4297-9c0f-68021d811c63\r\nUser-Agent: PostmanRuntime/7.4.0\r\nX-Forwarded-For: 172.30.0.1\r\nX-Forwarded-Host: api.p2b.localhost\r\nX-Forwarded-Port: 80\r\nX-Forwarded-Proto: http\r\nX-Forwarded-Server: 1b09ec69555c\r\nX-Php-Ob-Level: 1\r\nX-Real-Ip: 172.30.0.1\r\n\r\n",
null,
"beer_label"
]
]
},
{
"file": "/var/www/html/web/core/lib/Drupal/Core/Render/Renderer.php",
"line": 582,
"function": "Drupal\\Core\\EventSubscriber\\{closure}",
"class": "Drupal\\Core\\EventSubscriber\\EarlyRenderingControllerWrapperSubscriber",
"type": "->",
"args": []
},
{
"file": "/var/www/html/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php",
"line": 124,
"function": "executeInRenderContext",
"class": "Drupal\\Core\\Render\\Renderer",
"type": "->",
"args": [
null,
null
]
},
{
"file": "/var/www/html/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php",
"line": 97,
"function": "wrapControllerExecutionInRenderContext",
"class": "Drupal\\Core\\EventSubscriber\\EarlyRenderingControllerWrapperSubscriber",
"type": "->",
"args": [
[
null,
"handleFileUploadForNewResource"
],
[
"POST /jsonapi/node/project/beer_label HTTP/1.1\r\nAccept: application/vnd.api+json\r\nAccept-Encoding: gzip, deflate\r\nAuthorization: Basic YWRtaW46YWRtaW4=\r\nCache-Control: no-cache\r\nContent-Disposition: file; filename=\"filename.jpg\"\r\nContent-Length: 0\r\nContent-Type: application/octet-stream\r\nHost: api.p2b.localhost\r\nMod-Rewrite: On\r\nPhp-Auth-Pw: admin\r\nPhp-Auth-User: admin\r\nPostman-Token: 5fdad9f8-c38e-4297-9c0f-68021d811c63\r\nUser-Agent: PostmanRuntime/7.4.0\r\nX-Forwarded-For: 172.30.0.1\r\nX-Forwarded-Host: api.p2b.localhost\r\nX-Forwarded-Port: 80\r\nX-Forwarded-Proto: http\r\nX-Forwarded-Server: 1b09ec69555c\r\nX-Php-Ob-Level: 1\r\nX-Real-Ip: 172.30.0.1\r\n\r\n",
null,
"beer_label"
]
]
},
{
"file": "/var/www/html/vendor/symfony/http-kernel/HttpKernel.php",
"line": 151,
"function": "Drupal\\Core\\EventSubscriber\\{closure}",
"class": "Drupal\\Core\\EventSubscriber\\EarlyRenderingControllerWrapperSubscriber",
"type": "->",
"args": []
},
{
"file": "/var/www/html/vendor/symfony/http-kernel/HttpKernel.php",
"line": 68,
"function": "handleRaw",
"class": "Symfony\\Component\\HttpKernel\\HttpKernel",
"type": "->",
"args": [
"POST /jsonapi/node/project/beer_label HTTP/1.1\r\nAccept: application/vnd.api+json\r\nAccept-Encoding: gzip, deflate\r\nAuthorization: Basic YWRtaW46YWRtaW4=\r\nCache-Control: no-cache\r\nContent-Disposition: file; filename=\"filename.jpg\"\r\nContent-Length: 0\r\nContent-Type: application/octet-stream\r\nHost: api.p2b.localhost\r\nMod-Rewrite: On\r\nPhp-Auth-Pw: admin\r\nPhp-Auth-User: admin\r\nPostman-Token: 5fdad9f8-c38e-4297-9c0f-68021d811c63\r\nUser-Agent: PostmanRuntime/7.4.0\r\nX-Forwarded-For: 172.30.0.1\r\nX-Forwarded-Host: api.p2b.localhost\r\nX-Forwarded-Port: 80\r\nX-Forwarded-Proto: http\r\nX-Forwarded-Server: 1b09ec69555c\r\nX-Php-Ob-Level: 1\r\nX-Real-Ip: 172.30.0.1\r\n\r\n",
1
]
},
{
"file": "/var/www/html/web/core/lib/Drupal/Core/StackMiddleware/Session.php",
"line": 57,
"function": "handle",
"class": "Symfony\\Component\\HttpKernel\\HttpKernel",
"type": "->",
"args": [
"POST /jsonapi/node/project/beer_label HTTP/1.1\r\nAccept: application/vnd.api+json\r\nAccept-Encoding: gzip, deflate\r\nAuthorization: Basic YWRtaW46YWRtaW4=\r\nCache-Control: no-cache\r\nContent-Disposition: file; filename=\"filename.jpg\"\r\nContent-Length: 0\r\nContent-Type: application/octet-stream\r\nHost: api.p2b.localhost\r\nMod-Rewrite: On\r\nPhp-Auth-Pw: admin\r\nPhp-Auth-User: admin\r\nPostman-Token: 5fdad9f8-c38e-4297-9c0f-68021d811c63\r\nUser-Agent: PostmanRuntime/7.4.0\r\nX-Forwarded-For: 172.30.0.1\r\nX-Forwarded-Host: api.p2b.localhost\r\nX-Forwarded-Port: 80\r\nX-Forwarded-Proto: http\r\nX-Forwarded-Server: 1b09ec69555c\r\nX-Php-Ob-Level: 1\r\nX-Real-Ip: 172.30.0.1\r\n\r\n",
1,
true
]
},
{
"file": "/var/www/html/web/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php",
"line": 47,
"function": "handle",
"class": "Drupal\\Core\\StackMiddleware\\Session",
"type": "->",
"args": [
"POST /jsonapi/node/project/beer_label HTTP/1.1\r\nAccept: application/vnd.api+json\r\nAccept-Encoding: gzip, deflate\r\nAuthorization: Basic YWRtaW46YWRtaW4=\r\nCache-Control: no-cache\r\nContent-Disposition: file; filename=\"filename.jpg\"\r\nContent-Length: 0\r\nContent-Type: application/octet-stream\r\nHost: api.p2b.localhost\r\nMod-Rewrite: On\r\nPhp-Auth-Pw: admin\r\nPhp-Auth-User: admin\r\nPostman-Token: 5fdad9f8-c38e-4297-9c0f-68021d811c63\r\nUser-Agent: PostmanRuntime/7.4.0\r\nX-Forwarded-For: 172.30.0.1\r\nX-Forwarded-Host: api.p2b.localhost\r\nX-Forwarded-Port: 80\r\nX-Forwarded-Proto: http\r\nX-Forwarded-Server: 1b09ec69555c\r\nX-Php-Ob-Level: 1\r\nX-Real-Ip: 172.30.0.1\r\n\r\n",
1,
true
]
},
{
"file": "/var/www/html/web/core/modules/page_cache/src/StackMiddleware/PageCache.php",
"line": 106,
"function": "handle",
"class": "Drupal\\Core\\StackMiddleware\\KernelPreHandle",
"type": "->",
"args": [
"POST /jsonapi/node/project/beer_label HTTP/1.1\r\nAccept: application/vnd.api+json\r\nAccept-Encoding: gzip, deflate\r\nAuthorization: Basic YWRtaW46YWRtaW4=\r\nCache-Control: no-cache\r\nContent-Disposition: file; filename=\"filename.jpg\"\r\nContent-Length: 0\r\nContent-Type: application/octet-stream\r\nHost: api.p2b.localhost\r\nMod-Rewrite: On\r\nPhp-Auth-Pw: admin\r\nPhp-Auth-User: admin\r\nPostman-Token: 5fdad9f8-c38e-4297-9c0f-68021d811c63\r\nUser-Agent: PostmanRuntime/7.4.0\r\nX-Forwarded-For: 172.30.0.1\r\nX-Forwarded-Host: api.p2b.localhost\r\nX-Forwarded-Port: 80\r\nX-Forwarded-Proto: http\r\nX-Forwarded-Server: 1b09ec69555c\r\nX-Php-Ob-Level: 1\r\nX-Real-Ip: 172.30.0.1\r\n\r\n",
1,
true
]
},
{
"file": "/var/www/html/web/core/modules/page_cache/src/StackMiddleware/PageCache.php",
"line": 85,
"function": "pass",
"class": "Drupal\\page_cache\\StackMiddleware\\PageCache",
"type": "->",
"args": [
"POST /jsonapi/node/project/beer_label HTTP/1.1\r\nAccept: application/vnd.api+json\r\nAccept-Encoding: gzip, deflate\r\nAuthorization: Basic YWRtaW46YWRtaW4=\r\nCache-Control: no-cache\r\nContent-Disposition: file; filename=\"filename.jpg\"\r\nContent-Length: 0\r\nContent-Type: application/octet-stream\r\nHost: api.p2b.localhost\r\nMod-Rewrite: On\r\nPhp-Auth-Pw: admin\r\nPhp-Auth-User: admin\r\nPostman-Token: 5fdad9f8-c38e-4297-9c0f-68021d811c63\r\nUser-Agent: PostmanRuntime/7.4.0\r\nX-Forwarded-For: 172.30.0.1\r\nX-Forwarded-Host: api.p2b.localhost\r\nX-Forwarded-Port: 80\r\nX-Forwarded-Proto: http\r\nX-Forwarded-Server: 1b09ec69555c\r\nX-Php-Ob-Level: 1\r\nX-Real-Ip: 172.30.0.1\r\n\r\n",
1,
true
]
},
{
"file": "/var/www/html/vendor/asm89/stack-cors/src/Asm89/Stack/Cors.php",
"line": 49,
"function": "handle",
"class": "Drupal\\page_cache\\StackMiddleware\\PageCache",
"type": "->",
"args": [
"POST /jsonapi/node/project/beer_label HTTP/1.1\r\nAccept: application/vnd.api+json\r\nAccept-Encoding: gzip, deflate\r\nAuthorization: Basic YWRtaW46YWRtaW4=\r\nCache-Control: no-cache\r\nContent-Disposition: file; filename=\"filename.jpg\"\r\nContent-Length: 0\r\nContent-Type: application/octet-stream\r\nHost: api.p2b.localhost\r\nMod-Rewrite: On\r\nPhp-Auth-Pw: admin\r\nPhp-Auth-User: admin\r\nPostman-Token: 5fdad9f8-c38e-4297-9c0f-68021d811c63\r\nUser-Agent: PostmanRuntime/7.4.0\r\nX-Forwarded-For: 172.30.0.1\r\nX-Forwarded-Host: api.p2b.localhost\r\nX-Forwarded-Port: 80\r\nX-Forwarded-Proto: http\r\nX-Forwarded-Server: 1b09ec69555c\r\nX-Php-Ob-Level: 1\r\nX-Real-Ip: 172.30.0.1\r\n\r\n",
1,
true
]
},
{
"file": "/var/www/html/web/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php",
"line": 47,
"function": "handle",
"class": "Asm89\\Stack\\Cors",
"type": "->",
"args": [
"POST /jsonapi/node/project/beer_label HTTP/1.1\r\nAccept: application/vnd.api+json\r\nAccept-Encoding: gzip, deflate\r\nAuthorization: Basic YWRtaW46YWRtaW4=\r\nCache-Control: no-cache\r\nContent-Disposition: file; filename=\"filename.jpg\"\r\nContent-Length: 0\r\nContent-Type: application/octet-stream\r\nHost: api.p2b.localhost\r\nMod-Rewrite: On\r\nPhp-Auth-Pw: admin\r\nPhp-Auth-User: admin\r\nPostman-Token: 5fdad9f8-c38e-4297-9c0f-68021d811c63\r\nUser-Agent: PostmanRuntime/7.4.0\r\nX-Forwarded-For: 172.30.0.1\r\nX-Forwarded-Host: api.p2b.localhost\r\nX-Forwarded-Port: 80\r\nX-Forwarded-Proto: http\r\nX-Forwarded-Server: 1b09ec69555c\r\nX-Php-Ob-Level: 1\r\nX-Real-Ip: 172.30.0.1\r\n\r\n",
1,
true
]
},
{
"file": "/var/www/html/web/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php",
"line": 52,
"function": "handle",
"class": "Drupal\\Core\\StackMiddleware\\ReverseProxyMiddleware",
"type": "->",
"args": [
"POST /jsonapi/node/project/beer_label HTTP/1.1\r\nAccept: application/vnd.api+json\r\nAccept-Encoding: gzip, deflate\r\nAuthorization: Basic YWRtaW46YWRtaW4=\r\nCache-Control: no-cache\r\nContent-Disposition: file; filename=\"filename.jpg\"\r\nContent-Length: 0\r\nContent-Type: application/octet-stream\r\nHost: api.p2b.localhost\r\nMod-Rewrite: On\r\nPhp-Auth-Pw: admin\r\nPhp-Auth-User: admin\r\nPostman-Token: 5fdad9f8-c38e-4297-9c0f-68021d811c63\r\nUser-Agent: PostmanRuntime/7.4.0\r\nX-Forwarded-For: 172.30.0.1\r\nX-Forwarded-Host: api.p2b.localhost\r\nX-Forwarded-Port: 80\r\nX-Forwarded-Proto: http\r\nX-Forwarded-Server: 1b09ec69555c\r\nX-Php-Ob-Level: 1\r\nX-Real-Ip: 172.30.0.1\r\n\r\n",
1,
true
]
},
{
"file": "/var/www/html/vendor/stack/builder/src/Stack/StackedHttpKernel.php",
"line": 23,
"function": "handle",
"class": "Drupal\\Core\\StackMiddleware\\NegotiationMiddleware",
"type": "->",
"args": [
"POST /jsonapi/node/project/beer_label HTTP/1.1\r\nAccept: application/vnd.api+json\r\nAccept-Encoding: gzip, deflate\r\nAuthorization: Basic YWRtaW46YWRtaW4=\r\nCache-Control: no-cache\r\nContent-Disposition: file; filename=\"filename.jpg\"\r\nContent-Length: 0\r\nContent-Type: application/octet-stream\r\nHost: api.p2b.localhost\r\nMod-Rewrite: On\r\nPhp-Auth-Pw: admin\r\nPhp-Auth-User: admin\r\nPostman-Token: 5fdad9f8-c38e-4297-9c0f-68021d811c63\r\nUser-Agent: PostmanRuntime/7.4.0\r\nX-Forwarded-For: 172.30.0.1\r\nX-Forwarded-Host: api.p2b.localhost\r\nX-Forwarded-Port: 80\r\nX-Forwarded-Proto: http\r\nX-Forwarded-Server: 1b09ec69555c\r\nX-Php-Ob-Level: 1\r\nX-Real-Ip: 172.30.0.1\r\n\r\n",
1,
true
]
},
{
"file": "/var/www/html/web/core/lib/Drupal/Core/DrupalKernel.php",
"line": 693,
"function": "handle",
"class": "Stack\\StackedHttpKernel",
"type": "->",
"args": [
"POST /jsonapi/node/project/beer_label HTTP/1.1\r\nAccept: application/vnd.api+json\r\nAccept-Encoding: gzip, deflate\r\nAuthorization: Basic YWRtaW46YWRtaW4=\r\nCache-Control: no-cache\r\nContent-Disposition: file; filename=\"filename.jpg\"\r\nContent-Length: 0\r\nContent-Type: application/octet-stream\r\nHost: api.p2b.localhost\r\nMod-Rewrite: On\r\nPhp-Auth-Pw: admin\r\nPhp-Auth-User: admin\r\nPostman-Token: 5fdad9f8-c38e-4297-9c0f-68021d811c63\r\nUser-Agent: PostmanRuntime/7.4.0\r\nX-Forwarded-For: 172.30.0.1\r\nX-Forwarded-Host: api.p2b.localhost\r\nX-Forwarded-Port: 80\r\nX-Forwarded-Proto: http\r\nX-Forwarded-Server: 1b09ec69555c\r\nX-Php-Ob-Level: 1\r\nX-Real-Ip: 172.30.0.1\r\n\r\n",
1,
true
]
},
{
"file": "/var/www/html/web/index.php",
"line": 19,
"function": "handle",
"class": "Drupal\\Core\\DrupalKernel",
"type": "->",
"args": [
"POST /jsonapi/node/project/beer_label HTTP/1.1\r\nAccept: application/vnd.api+json\r\nAccept-Encoding: gzip, deflate\r\nAuthorization: Basic YWRtaW46YWRtaW4=\r\nCache-Control: no-cache\r\nContent-Disposition: file; filename=\"filename.jpg\"\r\nContent-Length: 0\r\nContent-Type: application/octet-stream\r\nHost: api.p2b.localhost\r\nMod-Rewrite: On\r\nPhp-Auth-Pw: admin\r\nPhp-Auth-User: admin\r\nPostman-Token: 5fdad9f8-c38e-4297-9c0f-68021d811c63\r\nUser-Agent: PostmanRuntime/7.4.0\r\nX-Forwarded-For: 172.30.0.1\r\nX-Forwarded-Host: api.p2b.localhost\r\nX-Forwarded-Port: 80\r\nX-Forwarded-Proto: http\r\nX-Forwarded-Server: 1b09ec69555c\r\nX-Php-Ob-Level: 1\r\nX-Real-Ip: 172.30.0.1\r\n\r\n"
]
}
]
}
}
]
}| Comment | File | Size | Author |
|---|---|---|---|
| JsonApiExtras2.png | 86.81 KB | rodolfodribeiro | |
| JsonApiExtras1.png | 28.45 KB | rodolfodribeiro |
Comments
Comment #2
avpadernoComment #3
bbralaHmm, the file upload is a pretty different beast from what i understand and i don't plan on adding support for that specifically.
Comment #4
bbralaI think this issue in core ([3171154]) will fix this actually :)
Comment #5
ptmkenny commentedComment #6
ptmkenny commented