Sean Kelley
Posts: 0
Joined: Thu Oct 11, 2012 2:25 pm

delete file from appery database via service

I have my first delete service but when I attempt to delete files I get error:
405 method not allowed.

I am making an admin screen to manage files uploaded- delete etc. I am not sure if my problem is related to my request id used or security. I also tried a service test with same result.

For example, for the file:
code
https://api.appery.io/rest/1/db/files/51b642afe4b0e832dd8ff37c/f7090c13-77ae-4d5c-a846-c81f250cb716.image.jpg
/code
I am including in my request:
filename=f7090c13-77ae-4d5c-a846-c81f250cb716.image.jpg

I also have a related question about administration of files via REST- When others create a file, do I need to explicitly give each uploaded file write permissions each time, for an admin user or is there a superuser database account that can do that with? Maybe my Appery.io login?

Sean Kelley
Posts: 0
Joined: Thu Oct 11, 2012 2:25 pm

delete file from appery database via service

Thanks- In attempting to start from scratch, I deleted the service tack_tackFile_delete_service. Now I cannot figure out how to get it back. I thought maybe that it was automatically created when adding tack_text_delete_service (one of the collections) so I deleted and re-added that, but it did not work. How do I add back the file delete service?

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

delete file from appery database via service

Hello! Services you use to work with files don't create automatically. You have to create them manually. The link Katya suggested http://docs.appery.io/documentation/b... should help. If service returns any error - please post service setting screenshot.

Sean Kelley
Posts: 0
Joined: Thu Oct 11, 2012 2:25 pm

delete file from appery database via service

I am not getting any errors because I cannot find a way to add the service back.
here is the list of current services in project:
Image

Here is the list of available database services:
Image

There are no ...File... choices available

Sean Kelley
Posts: 0
Joined: Thu Oct 11, 2012 2:25 pm

delete file from appery database via service

here is a service list for an earlier version of my project which contains the missing ...tackFile... delete service
Image

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

delete file from appery database via service

Hello! Just to clarify - after you click Create New -- Database Services you imported all services for "tack" DB then deleted "tack_tackFile_delete_service" and now you are not able to add it back?

Sean Kelley
Posts: 0
Joined: Thu Oct 11, 2012 2:25 pm

delete file from appery database via service

thats right

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

delete file from appery database via service

Strange as I'm able to add service back... I'll update.

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

delete file from appery database via service

Service "tack_tackFile_delete_service" means that there is a collection "tackFile" in "tack" DB and you're trying to create Delete service for this collection. On your screenshot there is only "text" collection. Could you scroll down and check if there is "tackFile" collection? Select needed service for this collection. If there is no such collection in the list check your back-end service - is there "tackFile" collection in "tack" DB (perhaps you deleted it)?

Return to “Issues”