Forum Discussion

jc758's avatar
jc758
Advisor
11 years ago

Get attachment date

Hi

 

is there a way to get the last updated date for an attachment?

 

Don't see anything related to this in the doc.

 

Thanx per advance.

 

JC

5 Replies

  • AFAIK, updating the attachments isn't possible, when you edit the message, all you do is add new attachment and remove the old one.
  • jc758's avatar
    jc758
    Advisor
    11 years ago

    GrazittiI  thanks for the prĂ©cision.

     

    anyway, is it possible to get the "created date" for an attachement?

     

    regards

     

    JC

  • jc758 - Though the direct call i.e. /restapi/vc/messages/id/[id]/uploads/attachments/ doesn't return anything regarding the date, but technically, there are 2 possibilities to fetch this.

     

    1. As the attachments are uploaded at the time of the Post created, so this would be same as the posted time.

    2. Other scenario could be if the user uploaded the attachment while editing the post, so in that case, created date for attachment would be the edited date of the post.

     

    Let me know if this helps.

  • jc758's avatar
    jc758
    Advisor
    11 years ago

    VarunGrazitti 

     

    This workaround would work for one attachement per article... "Unfortunatly" we've got several documents on articles, an not uploaded at the same time (and often updated). So we can rely on the article dates.

     

    Maybe a custom metadata could do the trick, if metadata are supported on attachment of course.

     

    Thanks for your help

     

    JC

  • Correct, that'd be the limitation in this case. Suggest you contact support for the api if it exists.