0

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

null

Content aside

  • 8 days agoLast active
  • 3Replies
  • 52Views
  • 2 Following