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

Files are not deleted from the directory data/files/tasks/. #5365

Open
pilotspelman opened this issue Oct 26, 2023 · 3 comments
Open

Files are not deleted from the directory data/files/tasks/. #5365

pilotspelman opened this issue Oct 26, 2023 · 3 comments

Comments

@pilotspelman
Copy link

When I use the command "Remove" to remove (delete) a file attached to a task, only the link seems to be removed. The associated file in the numbered directory ##/ (same number as the Task ID) remains and occupies space (that may be limiting in the long term). The associated file does not have the same name as the uploaded file but is renamed to a long sequence of digits. However, it is indeed the same file, which can be validated by simply renaming it to the original file name after downloading.
I have not found any "purge command" anywhere. Is this a bug?
It would be inconvenient to identify leftover files manually to delete them to save space.

Configuration

  • Kanboard version: 1.2.32
  • Database type and version: SQLite (version 3.31.1)
  • PHP version: 8.0.30
  • OS: Linux 5.15.0-75-generic
  • Browser: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/119.0
@fguillot
Copy link
Member

fguillot commented Dec 3, 2023

I can't reproduce on my side. Do you see any error in the logs when removing the attachment? Any permission issues?

@kozmotronik
Copy link

kozmotronik commented Nov 21, 2024

Hi there! Same issue here. Let me give some details for you to inspect better.

  1. I want to delete an attached file
  2. Kanboard asks me a confirmation and I click to Yes, then it keeps spinning but nothing happens
    2024-11-21 16 01 27 kozmotronik net tr 79009b462a3b
  3. The console output: this output might not be related to delete file operation. It was there when I open the console. It might be left over from another prior operation.
    2024-11-21 16 01 52 kozmotronik net tr dffe4a2ba2e8
Failed to load resource: https://kozmotronik.net.tr/kanboard/?controller=ChatController&action=show&plugin=Chat the server responded with a status of 500 ()

Kanboard details

Application Version 1.2.42 Installed on 11 November 2024
PHP Version 8.3.13
PHP SAPI fpm-fcgi
HTTP Client cURL
Server OS Linux 6.1.0-27-amd64
Database Driver mysql
Database Version 10.11.6-MariaDB-0+deb12u1
Browser Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36

Update

Here is a HTML capture when that dialog popped up if it helps you to debug:

<div id="modal-box" style="width: 800px;">
   <div id="modal-header"><a href="#" id="modal-close-button"><i class="fa fa-times"></i></a></div>
   <div id="modal-content">
      <div class="page-header">
         <h2>Remove a file</h2>
      </div>
      <div class="confirm">
         <p class="alert alert-info">
            Do you really want to remove this file: "1732187123715.png"?    
         </p>
         <div class="js-confirm-buttons-rendered" data-params="{&quot;url&quot;:&quot;\/kanboard\/task\/8\/file\/1\/remove?csrf_token=021dc06f78497f2177bc4825aa2d4842a5d139d73ffe1028356e2dea55a3dccd&quot;,&quot;submitLabel&quot;:&quot;Yes&quot;,&quot;orLabel&quot;:&quot;or&quot;,&quot;cancelLabel&quot;:&quot;cancel&quot;,&quot;tabindex&quot;:null}">
            <div class="form-actions"><button id="modal-confirm-button" type="button" class="btn btn-red" disabled=""><i class="fa fa-spinner fa-pulse"></i> Yes</button> or <a href="#">cancel</a></div>
         </div>
      </div>
   </div>
</div>

@kozmotronik
Copy link

Same happens also when I want to delete Automatic Actions on a project.
2024-11-21 16 14 32 kozmotronik net tr 3c18a6f85c6f
But there are no warnings or errors in console for this.

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

No branches or pull requests

3 participants