Page 1 of 1

Increment attachment names/making attachments unique

Posted: Wed Nov 29, 2017 10:33 am
by chris.brady
I'm curious why this isn't standard functionality through the API. If I attach a file called XYZ.pdf through the UI, if a file already exists by that name, the UI increments it to XYZ (1).pdf.

Why doesn't this behavior carry over when using the API with IAttachmentFolder.NewFile? While I understand creating a routine to do the same thing isn't hard, why rely on customers to do it when it should be easy to implement yourselves?

Or does this functionality exist, and I've totally missed it?

Re: Increment attachment names/making attachments unique

Posted: Wed Nov 29, 2017 12:46 pm
by BobRichards
External API programmers use the same interface that both the client and server applications have. While adding convenience functionality would *probably* be done if the API was difficult to use, we have to draw a line in the sand regarding this type of feature creep. Remember that it would require at least twice the testing effort to cover the additional code paths.