Support Topics Documentation Slack YouTube Blog

Access file api via server code

Hello there, i am using this simple code to delete objects from a table after certain amount of time,
I am wondering how to access files api because objects were deleted but images assosiated with those objects are still there
/*
let month = Date.now() - 30 * 24 * 60 * 60 * 1000

return Backendless.Data.of('NameOfTable').bulkDelete(`created <= ${ month }`) // delete obsolete
.catch(function(error) {
	console.log('Server reported an error ' + error)
})  

*/
I tried to replace “NameOfTable” with “NameOfFolder” but its not working

Hello @Mohammed_Abdalla

I assume you mixed two principally different services Data and Files


you need to remove them (files) in a separated API call

Regards, Vlad

this information works on server side?

i forgot to till you i am using the above code in a timer

yes, and it works on the client side as well

ok

so there is no bulkDelete method in files api?

@vladimir-upirov

no, but you can store the files under a particular folder and then remove the folder entirely

@vladimir-upirov can i move an object from one folder to another?

Yes, you can:

fine, thanks