Skip to content

REST Delete file error #1411

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
umusset opened this issue Apr 7, 2016 · 5 comments
Closed

REST Delete file error #1411

umusset opened this issue Apr 7, 2016 · 5 comments

Comments

@umusset
Copy link

umusset commented Apr 7, 2016

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 !

@flovilmart
Copy link
Contributor

remove the myAPP and it should work.

@umusset
Copy link
Author

umusset commented Apr 7, 2016

It works ! Thanks :)

@umusset umusset closed this as completed Apr 7, 2016
@flovilmart
Copy link
Contributor

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

@RaschidJFR
Copy link
Contributor

RaschidJFR commented Feb 12, 2019

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'

@RaschidJFR
Copy link
Contributor

RaschidJFR commented Feb 12, 2019

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants