Forum Discussion
_anomDiebolt_
11 years agoQrew Elite
It is undocumented but you have to specify two parameters for each file attachment you want to delete. In the URL below we are deleting the file saved in the file attachment field with fid=9 and [Record ID#]=43. Here is the format of the unwound URL for a GET request:
https://<your subdomain>.quickbase.com/db/<your dbid>
?act=API_EditRecord
&rid=43
&_fid_9=
&delfile_fid_9=1
&apptoken=<your apptoken>
The pastie entry below shows a POST using a jQuery promise that accomplishes the same thing:
Pastie Database
https://haversineconsulting.quickbase.com/db/bgcwm2m4g?a=dr&rid=285
This was not obvious so its time for a celebratory song:
http://dualcoremusic.com/nerdcore/upload/dual_core-trust_me.mp3
https://<your subdomain>.quickbase.com/db/<your dbid>
?act=API_EditRecord
&rid=43
&_fid_9=
&delfile_fid_9=1
&apptoken=<your apptoken>
The pastie entry below shows a POST using a jQuery promise that accomplishes the same thing:
Pastie Database
https://haversineconsulting.quickbase.com/db/bgcwm2m4g?a=dr&rid=285
This was not obvious so its time for a celebratory song:
http://dualcoremusic.com/nerdcore/upload/dual_core-trust_me.mp3
JeffKelly1
6 years agoQrew Member
Do you know of any way to delete all revisions? I'm hoping to clear up some usage but this method just leaves the attachment in the attachment history.
------------------------------
Jeff Jeff
------------------------------
------------------------------
Jeff Jeff
------------------------------
- MarkShnier__You6 years ago
Qrew Legend
Try this thread, for Eric's response and post back when you get it working with your code. If you get a URL working to delete one revision version, but need help stringing several of them together to delete the other versions, post back and I can help with that.
https://community.quickbase.com/communities/community-home/digestviewer/viewthread?MessageKey=9e640229-f87e-42c1-b243-da04a6381a26&CommunityKey=d860b0f8-6a48-487b-b346-44c47a19a804&tab=digestviewer
------------------------------
Mark Shnier (YQC)
Quick Base Solution Provider
Your Quick Base Coach
http://QuickBaseCoach.com
mark.shnier@gmail.com
------------------------------- JeffKelly16 years agoQrew MemberTo test deleting the previous version, so far I've tried adding the following parameters to the URL with no luck:
&_vid_1=
&_vid_1=0
&delfile_vid_1=0
&_vid_1=&delfile_vid_1=1
&_vid_1=&delfile_vid_1=0
Also tried these with "_vid_2" just in case it's one-indexed.
------------------------------
Jeff Jeff
------------------------------- MarkShnier__You6 years ago
Qrew Legend
Yes I see that this is not solved.
I tried this to try to delete the 1st revision, ie the 2nd one on the list, but it did not work. So right now I'm stumped too.
var text DeleteFile = URLRoot() & "db/" & Dbid() & "?act=API_EditRecord&rid=" & [Record ID#]
& "&_fid_7="
& "&delfile_fid_7=1"
& "&vid=1";
var text DisplayRecord = URLRoot() & "db/" & Dbid() & "?a=dr&rid=" & [Record ID#];
$DeleteFile
& "&rdr=" & URLEncode($DisplayRecord)
------------------------------
Mark Shnier (YQC)
Quick Base Solution Provider
Your Quick Base Coach
http://QuickBaseCoach.com
mark.shnier@gmail.com
------------------------------