File upload still erroring

@OmarAlmonte I see the contact create sdk call issue is resolved. congratulations. I’m asking now about the file upload error 500? Thanks!

1) TestFileUpload::testUploadAttachments
TestFileUpload::testUploadAttachments(): expected "File Upload Test: uploaded "sampleFile.zip"", actual: File 'sampleFile.zip' could not be uploaded
Could not upload file
[500] Server error: `POST https://api.keap.com/crm/rest/v2/files?file=Hello%2C%20world%21%0A&file_name=sampleFile.zip&contact_id=50109&is_public=&file_association=CONTACT` resulted in a `500 Internal Server Error` response:
{"code":500,"message":"An unexpected error occurred","status":"Internal Server Error","details":[{"domain":"file","resou (truncated...)

Hi Jeffrey, thanks for checking. The fix for the files upload issue has not been deployed yet. It will be included in our next release and will be available in the next SDK version as well.

I’ll let you know once it’s deployed and available.

Hi @Jeffrey_Chimene, this is now fixed.

@OmarAlmonte
nope

composer update
Loading composer repositories with package information
Updating dependencies
Lock file operations: 1 install, 4 updates, 0 removals
  - Upgrading guzzlehttp/guzzle (7.10.6 => 7.11.1)
  - Upgrading guzzlehttp/promises (2.4.1 => 2.5.0)
  - Upgrading guzzlehttp/psr7 (2.10.4 => 2.11.0)
  - Upgrading keap/keap-sdk (2.0.12 => 2.0.13)
  - Locking symfony/polyfill-php80 (v1.37.0)
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 1 install, 4 updates, 0 removals
  - Downloading guzzlehttp/promises (2.5.0)
  - Downloading symfony/polyfill-php80 (v1.37.0)
  - Downloading guzzlehttp/psr7 (2.11.0)
  - Downloading guzzlehttp/guzzle (7.11.1)
  - Downloading keap/keap-sdk (2.0.13)
  - Upgrading guzzlehttp/promises (2.4.1 => 2.5.0): Extracting archive
  - Installing symfony/polyfill-php80 (v1.37.0): Extracting archive
  - Upgrading guzzlehttp/psr7 (2.10.4 => 2.11.0): Extracting archive
  - Upgrading guzzlehttp/guzzle (7.10.6 => 7.11.1): Extracting archive
  - Upgrading keap/keap-sdk (2.0.12 => 2.0.13): Extracting archive
Generating autoload files
29 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
No security vulnerability advisories found.

Still erring

1) TestFileUpload::testUploadAttachments
TestFileUpload::testUploadAttachments(): expected "File Upload Test: uploaded "sampleFile.zip"", actual: File 'sampleFile.zip' could not be uploaded
Could not upload file
[500] Server error: `POST https://api.keap.com/crm/rest/v2/files` resulted in a `500 Internal Server Error` response:
{"code":500,"message":"An unexpected error occurred","status":"Internal Server Error","details":[{"domain":"file","resou (truncated...)

Failed asserting that 'File 'sampleFile.zip' could not be uploaded\n
Could not upload file\n
[500] Server error: `POST https://api.keap.com/crm/rest/v2/files` resulted in a `500 Internal Server Error` response:\n
{"code":500,"message":"An unexpected error occurred","status":"Internal Server Error","details":[{"domain":"file","resou (truncated...)\n
' [ASCII](length: 320) contains "File Upload Test: uploaded "sampleFile.zip"" [ASCII](length: 43).

/Volumes/APFS/git/gravity-forms-infusionsoft-add-on/systasis-gf-infusionsoft-feed/tests/HOTFIX-Rest-V2/testFileUpload.php:47

The patch you provided still works:

composer tfu
testFileUpload
Installing...
Running as single site... To run multisite, use -c tests/phpunit/multisite.xml
PHPUnit 10.5.63 by Sebastian Bergmann and contributors.

Runtime:       PHP 8.5.6 with Xdebug 3.5.0
Configuration: /Volumes/APFS/git/gravity-forms-infusionsoft-add-on/systasis-gf-infusionsoft-feed/phpunit.xml

..* Host api.infusionsoft.com:443 was resolved.
* IPv6: (none)
* IPv4: 34.111.147.222
*   Trying 34.111.147.222:443...
* ALPN: curl offers http/1.1
* SSL Trust Anchors:
*   CAfile: /opt/homebrew/etc/openssl@3/cert.pem
* SSL connection using TLSv1.3 / TLS_AES_256_GCM_SHA384 / x25519 / RSASSA-PSS
* ALPN: server accepted http/1.1
* Server certificate:
*   subject: CN=api.infusionsoft.com
*   start date: May 15 11:58:26 2026 GMT
*   expire date: Aug 13 12:53:00 2026 GMT
*   issuer: C=US; O=Google Trust Services; CN=WR3
*   Certificate level 0: Public key type RSA (2048/112 Bits/secBits), signed using sha256WithRSAEncryption
*   Certificate level 1: Public key type RSA (2048/112 Bits/secBits), signed using sha256WithRSAEncryption
*   Certificate level 2: Public key type RSA (4096/152 Bits/secBits), signed using sha384WithRSAEncryption
*   subjectAltName: "api.infusionsoft.com" matches cert's "api.infusionsoft.com"
* OpenSSL verify result: 0
* SSL certificate verified via OpenSSL.
* Established connection to api.infusionsoft.com (34.111.147.222 port 443) from 10.151.198.183 port 55516 
* using HTTP/1.x
> POST /crm/rest/v2/files HTTP/1.1
Host: api.infusionsoft.com
User-Agent: GuzzleHttp/7
Content-Type: multipart/form-data; boundary=38961c36b52b3ea48f3cf332dbbe20b581878f93
Authorization: Bearer KeapAK-14b942cdbe
Accept: application/json
Content-Length: 864

* upload completely sent off: 864 bytes
< HTTP/1.1 201 Created
< date: Mon, 08 Jun 2026 14:28:05 GMT
< content-type: application/json;charset=UTF-8
< pragma: no-cache
< cache-control: no-cache, no-store
< expires: Mon, 08 Jun 2026 14:28:04 GMT
< set-cookie: JSESSIONID=D5EA0424DE7D2844868D70EB2F74BA69; Path=/; Secure; HttpOnly
< set-cookie: GCLB=CIXW47f49eHqFRAD; path=/; HttpOnly; expires=Tue, 09-Jun-2026 02:28:04 GMT
< set-cookie: __cf_bm=vkyko0IYcVJL8c8egDRgAlNr86nutfA0IKsUMLvJWHw-1780928884.5491824-1.0.1.1-CxqDx2lYKhZdH2EfMlpIcSkpf4P27p4So3OXReEPTSwRSXqtX93InUvKf_kSaG5caU_a8zWkAcegIpeagqVT41MIASODF7KqxwhLlPLxegA04Z98enshpfGl9RMw6r8f; HttpOnly; SameSite=None; Secure; Path=/; Domain=infusionsoft.com; Expires=Mon, 08 Jun 2026 14:58:05 GMT
< content-security-policy: frame-ancestors 'self' http://localhost:10239 http://local.infusiontest.com:10239 https://local.infusiontest.com:10239 https://app.intg.infusiontest.com https://app.stge.infusiontest.com https://app.infusionsoft.com
< strict-transport-security: max-age=31536000; includeSubDomains
< x-content-type-options: nosniff
< x-xss-protection: 1; mode=block
< x-frame-options: DENY
< vary: accept-encoding
< cf-cache-status: DYNAMIC
< cf-ray: a08894b86c6d2429-IAD
< x-keap-product-spike-limit: 
< x-keap-product-throttle-limit: 240
< x-keap-product-throttle-time-unit: minute
< x-keap-product-throttle-interval: 1
< x-keap-product-throttle-available: 230
< x-keap-product-throttle-used: 10
< x-keap-product-quota-limit: 30000
< x-keap-product-quota-time-unit: day
< x-keap-product-quota-interval: 1
< x-keap-product-quota-available: 29975
< x-keap-product-quota-used: 25
< x-keap-product-quota-expiry-time: 1780963200000
< x-keap-tenant-id: sd108.infusionsoft.com
< x-keap-tenant-throttle-limit: 250000
< x-keap-tenant-throttle-time-unit: minute
< x-keap-tenant-throttle-interval: 1
< x-keap-tenant-throttle-available: 249990
< x-keap-tenant-throttle-used: 10
< access-control-allow-credentials: true
< access-control-allow-origin: *
< x-request-id: 0202fb0b-bb0f-4598-a8c8-6e19de294879
< Via: 1.1 google, 1.1 google
< Alt-Svc: h3=":443"; ma=2592000
< Transfer-Encoding: chunked
< 
* Connection #0 to host api.infusionsoft.com:443 left intact
.* Host api.infusionsoft.com:443 was resolved.
* IPv6: (none)
* IPv4: 34.111.147.222
*   Trying 34.111.147.222:443...
* ALPN: curl offers http/1.1
* SSL Trust Anchors:
*   CAfile: /opt/homebrew/etc/openssl@3/cert.pem
* SSL connection using TLSv1.3 / TLS_AES_256_GCM_SHA384 / x25519 / RSASSA-PSS
* ALPN: server accepted http/1.1
* Server certificate:
*   subject: CN=api.infusionsoft.com
*   start date: May 15 11:58:26 2026 GMT
*   expire date: Aug 13 12:53:00 2026 GMT
*   issuer: C=US; O=Google Trust Services; CN=WR3
*   Certificate level 0: Public key type RSA (2048/112 Bits/secBits), signed using sha256WithRSAEncryption
*   Certificate level 1: Public key type RSA (2048/112 Bits/secBits), signed using sha256WithRSAEncryption
*   Certificate level 2: Public key type RSA (4096/152 Bits/secBits), signed using sha384WithRSAEncryption
*   subjectAltName: "api.infusionsoft.com" matches cert's "api.infusionsoft.com"
* OpenSSL verify result: 0
* SSL certificate verified via OpenSSL.
* Established connection to api.infusionsoft.com (34.111.147.222 port 443) from 10.151.198.183 port 55521 
* using HTTP/1.x
> POST /crm/rest/v2/files HTTP/1.1
Host: api.infusionsoft.com
User-Agent: GuzzleHttp/7
Content-Type: multipart/form-data; boundary=e3f731547a3e0dad45a42ac8713d44b42bc58bec
Authorization: Bearer KeapAK-14b942cdbe450e48
Accept: application/json
Content-Length: 864

* upload completely sent off: 864 bytes
< HTTP/1.1 201 Created
< date: Mon, 08 Jun 2026 14:28:07 GMT
< content-type: application/json;charset=UTF-8
< pragma: no-cache
< cache-control: no-cache, no-store
< expires: Mon, 08 Jun 2026 14:28:07 GMT
< set-cookie: JSESSIONID=A7A85CA631D94863BB2DE25C2DBAAF6E; Path=/; Secure; HttpOnly
< set-cookie: GCLB=CK73lpT8g5m0XxAD; path=/; HttpOnly; expires=Tue, 09-Jun-2026 02:28:07 GMT
< set-cookie: __cf_bm=wadeiz96zu727WSEBIs_PMus91sCG5wqOTfIJhblf0M-1780928887.7189667-1.0.1.1-_Z1mJG4blaX1PF8g3GszEWJDwk2n7HgH9PDrJ7_3Pr8p8RSeLI3XnottbNWhsUhXH9Rw8SoD.UULYlOpllMcemBu5hfm_30GmlAOMEtKxxZk0Jm77RRC0P9RVKzBz.vQ; HttpOnly; SameSite=None; Secure; Path=/; Domain=infusionsoft.com; Expires=Mon, 08 Jun 2026 14:58:07 GMT
< content-security-policy: frame-ancestors 'self' http://localhost:10239 http://local.infusiontest.com:10239 https://local.infusiontest.com:10239 https://app.intg.infusiontest.com https://app.stge.infusiontest.com https://app.infusionsoft.com
< strict-transport-security: max-age=31536000; includeSubDomains
< x-content-type-options: nosniff
< x-xss-protection: 1; mode=block
< x-frame-options: DENY
< vary: accept-encoding
< cf-cache-status: DYNAMIC
< cf-ray: a08894cc391738dd-IAD
< x-keap-product-spike-limit: 
< x-keap-product-throttle-limit: 240
< x-keap-product-throttle-time-unit: minute
< x-keap-product-throttle-interval: 1
< x-keap-product-throttle-available: 225
< x-keap-product-throttle-used: 15
< x-keap-product-quota-limit: 30000
< x-keap-product-quota-time-unit: day
< x-keap-product-quota-interval: 1
< x-keap-product-quota-available: 29970
< x-keap-product-quota-used: 30
< x-keap-product-quota-expiry-time: 1780963200000
< x-keap-tenant-id: sd108.infusionsoft.com
< x-keap-tenant-throttle-limit: 250000
< x-keap-tenant-throttle-time-unit: minute
< x-keap-tenant-throttle-interval: 1
< x-keap-tenant-throttle-available: 249985
< x-keap-tenant-throttle-used: 15
< access-control-allow-credentials: true
< access-control-allow-origin: *
< x-request-id: 69ccc791-befd-47d4-a31d-98361e4f3ea9
< Via: 1.1 google, 1.1 google
< Alt-Svc: h3=":443"; ma=2592000
< Transfer-Encoding: chunked
< 
* Connection #0 to host api.infusionsoft.com:443 left intact
.                                                                4 / 4 (100%)

Time: 00:10.568, Memory: 108.02 MB

OK (4 tests, 12 assertions)