Skip to content
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

Cancelling an image upload in building management is not handled #373

Open
bryantal opened this issue Jun 30, 2020 · 2 comments
Open

Cancelling an image upload in building management is not handled #373

bryantal opened this issue Jun 30, 2020 · 2 comments
Assignees
Labels
bug Something isn't working good first issue Good for newcomers minor

Comments

@bryantal
Copy link
Collaborator

Original report by Scott Heggen (Bitbucket: sheggen, GitHub: sheggen).


Files: buildingManagement.py

UI: /buildingManagement

When a user is in the process of uploading an image using the Dropzone widget, they have the choice to cancel the upload while it’s in progress. Our controller doesn’t handle this issue, but instead throws a 400 bad request error. The error has no negative impact on the application, as far as I could tell.

@bryantal bryantal added minor bug Something isn't working good first issue Good for newcomers labels Jun 1, 2021
@Ebenezer997
Copy link
Collaborator

test the canceling of the image upload and we did not get the 400 error. We believe the issue is already solved

@sheggen
Copy link
Collaborator

sheggen commented Jun 6, 2021

@Ebenezer997 's DDS reported that no images are ever deleted from CAS when they are removed in the buildingmanagement UI. That is an implementation error, and should be fixed; removing an image should... remove the image!

This will need implemented in multiple places: the JS handler for dropzone will need to implement the correct configuration for allowing remote deletion of files. The controller file will need a route for deleting files. The file will need removed + reference to it in the DB removed. The controller will need to gracefully handle missing files (e.g., someone deletes the file on the server manually).

A bigger issue that needs discussed in the morning meeting will be handling of images; they probably shouldn't be in the repo, since the images are "data", not part of the codebase.

Lastly, as design and implementation of this fix is considered, so should the security of the system. A controller that arbitrarily deletes any file that is sent to it would be a major security problem. Be mindful of security!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers minor
Projects
None yet
Development

No branches or pull requests

4 participants