Forum Discussion
I am attempting to do this as well, but the version parameter easily breaks because I can't seem to find a way to dynamically populate that into the URL. The JSON Restful API does a great job to deleting the version if you identify it...but the moment someone uploads new, the table gives it a new version number...not "1"...even if you tell the field to only keep 1.
I am not sure if you still need pipeline to delete file from attachments.
You can create a pipeline to delete file from file attachment:
Channel To Use: Fetch JSON
JSON URL: https://api.quickbase.com/v1/files/xxxxxx/[Record ID#]/File attachment FID/0
Outgoing Method type: DELETE
Headers:
QB-Realm-Hostname:domain.quickbase.com
User-Agent:FileService_Integration_V2.1
Authorization:QB-USER-TOKEN yyyyyyyyyyyyyyyyyyyy
In JSON URL last parameter is "0" so it will delete latest version. If you copy this pipeline step 3 times and if you run these steps back to back it will delete all available 3 versions of file attachments.
You need to make sure that you have correct table Dbid(instead of "xxxxxx" in url), Record ID#, File Attachment field id:
URL would look like this: https://api.quickbase.com/v1/files/xxxxxxx/100/16/0
AND correct user token(instead of "yyyyyyyyyyyyyyyyy" above)
I hope this helps
Thank you
- rbuschmeyer2 months agoQrew Trainee
Thank you very much Razi. I will give this a shot. The versioning is what was really throwing me off...