Where is this documented?
(I'd like to attach a file during cmd=new or cmd=edit)
For .NET see How do I upload file attachments using the XML API in .NET C# or VB.NET?
|
1
|
Where is this documented? (I'd like to attach a file during cmd=new or cmd=edit) For .NET see How do I upload file attachments using the XML API in .NET C# or VB.NET? |
|||
|
|
|
1
|
This is documented under the "API" section of the "Advanced Help Topics" of the FogBugz help. To quote...
|
||||||
|
|
1
|
I gave up trying to use the XML API when I discovered that you can email cases@yourdomain.fogbugz.com with the subject "Case ###" where ### is the ix of the case you wish to attach to. Multiple attachments work. Each file needs to be < 10MB and the total works up to about 25MB with OnDemand. Using C#, it takes about 10 lines of code to achieve this. It looks a bit like this (simplistic sample): using System.Net.Mail; ... String fromAddress = "michael@mydomain.com"; String toAddress = "cases@mydomain.fogbugz.com"; MailMessage message = new MailMessage(); message.From = new MailAddress(fromAddress); message.To.Add(new MailAddress(toAddress)); message.Subject = "Case " + ix.ToString(); foreach (path in attachmentPaths) { Attachment item = new Attachment(path); message.Attachments.Add(item); } SmtpClient smtpClient = new SmtpClient("smtp.mymailserver.com", 25); smtpClient.Credentials = new System.Net.NetworkCredential("user", "password"); smtpClient.Send(message); |
|||
|
|
0
|
Or you can try the excellent wrapper ( in C#). It contains the example on how to use the API to upload attachment. |
||
|
|