+ Start a Discussion
ben.bben.b 

new version of existing file upload

Is it possible to use APIChatter API to upload a new version of an existing file.  I see how to upload a new file but not a new version (e.g. go from V 1 to 2).    

 

Any help would be appreciated. 

kodeXkodeX

Do search the chatter boards before posting!

 

Currently chatter api, doesn't have functionality to upload new file versions.

 

I guess,

1. You may have to delete old version of file manually using api.

2.  Upload the new version again using api.

 

Reference-

http://boards.developerforce.com/t5/Chatter-and-Chatter-API/Chatter-REST-API-File-Upload-using-Request-body/td-p/366553

 

ben.bben.b

Thanks for reply.  That's unfortunately what I thought after not seeing in api or in forums. Too bad. I was hoping this capability was something undocumented perhaps or even doable with a workaround since obviously exists in platform.

 

Deleting and then uploading as you suggest *may* be workable so I will experiment with it.   Beyond the extra housekeeping and other work,though,  I am a bit concerned about how losing access to old versions will play though and whether the extra capability is worth the tradeoff of losing these older version and certainly losing the connection between them even if kept.  

 

Anyway, thanks for sugegstion. 

 

kodeXkodeX

Nice find!

Probably you can send a feature request to SalesForce about this problem!!

ben.bben.b

Kodex. OK. Thanks. I will do that.

 

In meantime, curious to hear what anyome may think of the approach kindly suggested.  Maybe there are cases where it may be OK to version like this. Access to old versions is usually quite important when documents are being collaborated on - less so once doc is complete and "ready to go" with editing done.. In the "ready to go" case, say for a marketing white paper, a contract or maybe even price sheet, a new "version" could in fact be a new - and potemtially newly named -  doc.  But if still being worked on - by "you" or anyone else - old versions need at very least to be ratained.  

 

Anyway, thanks again. 

kodeXkodeX

Hey ben.. maybe the solution to your problem lies here-

ContentDocumentRepresents a document that has been uploaded to a library in Salesforce CRM Content.
ContentDocumentHistoryRepresents the history of a document in Salesforce CRM Content.
ContentVersionRepresents a specific version of a document in Salesforce CRM Content.
ContentVersionHistoryRepresents the history of a specific version of a document in Salesforce CRM Content.

 

 

kodeX

 

 

 

ben.bben.b

Kodex, 

 

Thanks for idea. . Looks like it covers Chatter files in addition to Content so maybe just the ticket.  I'll take a deeper look and keep you posted. 

 

Thanks again.