APIs & Integrations

jayvee
Participant

API FILE UPLOAD NOT WORKING

Hi Everyone,

I was having a hard time on uploading a file using the API CMS FILES.. any idea how to fix this issue ?

Here's the error:
error4.PNG

Please see the attached photos for my code

error1.PNGHubSpot_Community_-_API_FILE_UPLOAD_NOT_WORKING_-_HubSpot_Community.pngerror3.PNG

0 Upvotes
3 Replies 3
IsaacTakushi
HubSpot Employee
HubSpot Employee

API FILE UPLOAD NOT WORKING

Hi, @jayvee.

 

Apologies for the delayed response. Nothing has jumped out to me yet.

 

What happens if you run DealFileUpload.php directly via the command line?

Isaac Takushi

Associate Certification Manager
0 Upvotes
jayvee
Participant

API FILE UPLOAD NOT WORKING

it shows all my code in command line. 

0 Upvotes
IsaacTakushi
HubSpot Employee
HubSpot Employee

API FILE UPLOAD NOT WORKING

Hi, @jayvee.

 

Did you paste the contents of DealFileUpload.php in your command line and run it?

If so, I should have been more specific. Please execute the DealFileUpload.phpfile itself via the terminal with something like php DealFileUpload.php.

 

Your PHP should execute and spit out a response, either in the command line itself or in your PHP log file. With Apache on Mac OSX, the logs should be in /var/log/apache2.

Isaac Takushi

Associate Certification Manager
0 Upvotes