• Resolved aleksandarpajic44

    (@aleksandarpajic44)


    Hello,

    I’m having a problem with API integration.

    I’ve seen that there here is already ticket. I see that it is resolved, so I’m interested in how to fix this problem. https://www.ads-software.com/support/topic/file-upload-to-api/

    So basically I’m using contact form for users to send data, which is redirected via API to my Laravel service.

    So I’m having a problem when user uploads a file, my service only gets title of that file, to be precise it gets only a string without uploaded file. I’ve tried to debbug this for a while, and I’ve found that there is a problem with API in this case. My service works when using postman to send data, I’ll show you some log examples below.

    This is what I should get:

    'file_zk' =>
      Illuminate\Http\UploadedFile::__set_state(array(
         'test' => false,
         'originalName' => 'Screenshot_20181221_150808.png',
         'mimeType' => 'image/png',
         'error' => 0,
         'hashName' => NULL,
      )),

    This is the problematic one, the one I get:

    ’file_vlasnicki_plan’ => ‘5e43d46f65f5d.pdf’,
    ‘file_vlasnicki_list’ => ‘karolina-nadi.pdf’,
    ‘file_izvod_plana’ => ‘icbtech-2.png’

    Thank you in advance!

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘API – File upload is string’ is closed to new replies.