| "\n\nFollowing fil was uploaded: " + filesname +"."; then attach this file |
thanks I'll check
no more info needed
everything is right in your code
just small correction: https://stackoverflow.com/questions/19116016/what-...
curl -v -F 'upload=@\"C:/myfile.txt\"' http://api.sherpadesk.com/files?ticket=10184396
I also fixed error NullReferenceException
POST /files
{
"asset" : 123, -- (arbitrary) asset id where files will be added
"ticket" : "ddg3jk", -- (arbitrary) ticket id where files will be added
"post_id" : "123" -- (arbitrary) post id (from ticket post list) where files will be added (can be any post including initial post)
} this is post request.It accepts ticket id-ddg3jk,but where is the reference to file that is getting attached? How will it come to know which file are you going to attach to the ticket ddg3jk?yea sorry post https://api.sherpadesk.com/files/
you can add other input they will be send as parameters to api from form
see https://m.sherpadesk.com/app.html?ionicPlatform=ios#
<html>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<form action="https://api.sherpadesk.com/files/m4hqne" method="POST" enctype="multipart/form-data">
<label><b>Upload Image</b></label>
<div><input type="file" name="img" id="img" /> <button type="submit">Upload</button></div>
<input name="ticket" />
<input name="account"/>
<input name="post_id"/>
<input name="is_tech_only"/>
</form>
</html>
see below:
You can use most common and reliable multipart/form-data on posting files
SAMPLE PAGE
<html> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <form action="https://api.sherpadesk.com/files/m4hqne" method="POST" enctype="multipart/form-data"> <label><b>Upload Image</b></label> <div><input type="file" name="img" id="img" /> <button type="submit">Upload</button></div> </form> </html>
От: sherpad...@googlegroups.com <sherpad...@googlegroups.com> от имени Vaibhav shukla <vaibhav1...@gmail.com>
Отправлено: 21 августа 2019 г. 12:04
Кому: SherpaDesk API <sherpad...@googlegroups.com>
Тема: Re: How to attach file to ticket and then create ticket using api?
--
You received this message because you are subscribed to the Google Groups "SherpaDesk API" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sherpadesk-ap...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sherpadesk-api/38589976-6eb9-484c-a59d-669942eee286%40googlegroups.com.