Can't delete file from code in ios

i am trying to delete a file with code in iOS but for some reason i have a problem with this.

i use


let fileURL = messageToPass.file?.fileURL

            backendless.fileService.remove(fileURL!, response: { (respone) in


                }, error: { (error) in



but have an error
FAULT = ‘6000’ [File or directory cannot be found.] <File or directory cannot be found.>
despite that before delete method i have a proper fileURL (

Must be a problem with directory mounting. Let us check.

What value do you use for fileURL? Is it the complete URL of the file? Just like this?:

i use this one -

in my example “file” is BackendlessFile Class and fileUrl is its default property

That is wrong. Please see the documentation:

It says: “The API to delete a file uses the <path>/<filename> part to identify the file which must be deleted.”

So i suppose it must be files/image1458248856.94247.jpg?

Hi Evgeny!

Please try without “files”.

Hooray! it works! Thanks, Kate!