Closed rwelty1889 closed 3 years ago
I can confirm that I receive the same message trying to delete a photo.
I think it deletes the image and gives the message because the image is gone and the app is trying to display it still. If I refresh the page the image count goes down for me.
I can confirm that the image now does get deleted once you refresh, this was not the original behavior I don't think though. It still gives a 400 error when deleting though again it does delete.
Still an issue, looks like the deletion code hits line 238 here (the error message): https://github.com/openstreetcam/openstreetcam.org/blob/378ca88ceb65b1b2835ce7c1759ddc231b7d99d6/src/app/sequence/sequence-base.component.ts#L212-L239
Here's the photoService.delete
method being called by that code (which it sounds like is sending a request with an unexpected body - weird because it still works):
https://github.com/openstreetcam/openstreetcam.org/blob/378ca88ceb65b1b2835ce7c1759ddc231b7d99d6/src/app/shared/api-services/osc/photoVx.service.ts#L71-L78
The _apiService.post
method here:
https://github.com/openstreetcam/openstreetcam.org/blob/378ca88ceb65b1b2835ce7c1759ddc231b7d99d6/src/app/shared/api-services/api-osc.service.ts#L42-L53
Edit:
Don't see any errors in the code here - and because the photo still gets deleted, I'm inclined to think that the request body is fine (the result of all the above code is a request to https://api.openstreetcam.org/1.0/photo/remove/
with the body {access_token: <secret>, photoId: <number>}
) and that this issue is on the API implementation end of things.
Any update for this bug, as it is still not possible to delete images.
please try delete photos on https://kartaview.org/ now
@tigren still not working with upload incomplete tracks https://kartaview.org/details/1446818/0/track-info https://kartaview.org/details/1449274 https://kartaview.org/details/1443154 https://kartaview.org/details/1378810 https://kartaview.org/details/1378321 https://kartaview.org/details/1378281 https://kartaview.org/details/1446418
@brmonaghan I can help delete the sequences you mentioned, meanwhile checking the root cause. Sorry for the inconvience
Are you going to delete these problematic videos? I don't understand what you are saying.
Oh wait. Editing
i am trying to clean up a track by deleting some images that are not placed correctly. i am getting the following message: "Photo cannot be deleted! 400 - Bad Request - 690: An unexpected server error has occurred"
the images i am trying to delete are the first few from this track: https://openstreetcam.org/details/1523285/100/track-info