Parse-server: REST Delete file error

Created on 7 Apr 2016  路  5Comments  路  Source: parse-community/parse-server

Hello,

Environment Setup

Parse server 2.2.6
mLAB

Steps to reproduce

Try to delete a file with cURL

curl -X DELETE \
-H "X-Parse-Application-Id: myapp" \
-H "X-Parse-Master-Key: mymaster" \
http://myAPP.herokuapp.com/parse/files/myAPP/bb92af56a083d9247196eff493d9a3cd_picture.jpg

Then i got an error : 404 Not Found , Cannot DELETE /parse/files/myAPP/bb92af56a083d9247196eff493d9a3cd_picture.jpg

Thanks !

Most helpful comment

remove the myAPP and it should work.

All 5 comments

remove the myAPP and it should work.

It works ! Thanks :)

We could add that endpoint as well but the appId is not really useful in that case as you pass it part of the headers

Is it still possible to delte files this way?
I'm running a local Parse Server. I'm receiving Cannot DELETE /MyAppName/files/GsVo6TefWYw2iMRq4jj33xIU7hoGc5LuxiK60sm8/5ad7de3d4e4decaa108a3024fae82f7c_hqdefault.jpg

My request:

curl -X DELETE \
  http://localhost:1337/MyAppName/files/GsVo6TefWYw2iMRq4jj33xIU7hoGc5LuxiK60sm8/5ad7de3d4e4decaa108a3024fae82f7c_hqdefault.jpg \
  -H 'Content-Type: application/json' \
  -H 'Postman-Token: ac16b301-c924-4a7c-8594-0f40d1ea764e' \
  -H 'X-Parse-Application-Id: GsVo6TefWYw2iMRq4jj33xIU7hoGc5LuxiK60sm8' \
  -H 'X-Parse-Master-Key: ****************' \
  -H 'cache-control: no-cache'

Never mind... I just changed the url to http://localhost:1337/MyAppName/files/5ad7de3d4e4decaa108a3024fae82f7c_hqdefault.jpg and it worked.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

darkprgrmmr picture darkprgrmmr  路  4Comments

ShawnBaek picture ShawnBaek  路  4Comments

mohmagdy picture mohmagdy  路  3Comments

pulse1989 picture pulse1989  路  3Comments

carjo422 picture carjo422  路  3Comments