DELETE multy attachments
let method := "DELETE";
let rid := text(this);
let teamid := first(select Settings).DatabaseTeam;
let dbid := first(select Settings).DatabaseID;
let tid := tableId(this);
let file := urlEncode(text(fileMetadata(this, last(split(text(item(files(this), 0)), "/"))).name));
let cont := "application/json";
let url := ---
https://api.ninox.com/v1/teams/{ teamid }/databases/{ dbid }/tables/{ tid }/records/{ rid }/files/{ file }
---;
let bear := "Bearer " + first(select Settings).'API-Key';
let response := do as server
http(method, url, {
Authorization: bear,
'Content-Type': cont
}, {})
end;
if response.error then
alert(text(response.error))
end
i have this code for delete one to one attachment .
Sameone can help me for change this code for delete all attachments in one step
thanks
3 replies
-
Have a look here
https://forum.ninox.com/t/y4yymy7/workspace-not-being-recovered-where-images-are-held-deleted
therr are various options
including delete all attachments to a table record
-
great!!! i finded the solution ...... thks
-
Can you mark post as aswered please
Content aside
- 8 mths agoLast active
- 3Replies
- 82Views
-
2
Following