Home > Mobile >  My uploaded files are stored on the server without format How to add a format to a file and submit t
My uploaded files are stored on the server without format How to add a format to a file and submit t

Time:05-24

I need to use the file this way :

        'file'=> new CURLFILE("1.jpg"));

My files are saved here like this:file without extention

The format of these files is JPG

What should I write instead of 1.Jepg?

CodePudding user response:

'file'=> new CURLFile('e9c55359-96ae-3b42-2605-6288ae4f4342', 'image/jpeg', '1.jpg'

CodePudding user response:

What is CURLFILE ? Is it a typo of CURLFile or is it a custom made class ?

You may try something like this: 'image' => new CURLFile('Your_File', 'image/jpeg', 'image').

  •  Tags:  
  • php
  • Related