marshmallow-packages / zoho-desk

Laravel Zoho Desk connector
MIT License
0 stars 0 forks source link

Example adding attachment into a Ticket #21

Closed fecosta90 closed 3 years ago

fecosta90 commented 3 years ago

Hey, i've tried so many ways to send attachments into Ticket, but no progress here. Can u guys help me with an example?

stefvanesch commented 3 years ago

Doesn't the example in the readme work for you?

Ticket::attachment($ticket_id, $path);

Do you get any errors?

fecosta90 commented 3 years ago

hey @stefvanesch, sorry for wasting your time.

I opened the function that sends the attachment, and I noticed that it uses the storage_path function. My file was being saved elsewhere. So I made the proper correction of the path to be used

$relative_path = 'app/public/'.$filePath; => now your function reads /var/www/application/storage/app/public/uploads/file.png

Thank you.

stefvanesch commented 3 years ago

@fecostadesousa no time was wasted! If you have any questions just let us know. Will update the package to make this usage more clear.