Moodle
  1. Moodle
  2. MDL-23989

The File Repository has no obvious way to delete a file.

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: 2.0
    • Fix Version/s: STABLE backlog
    • Component/s: Repositories
    • Labels:
    • Environment:
      Linux/Apache with Moodle 2.0 Preview 4+ (Build: 20100828) installed
    • Database:
      MySQL
    • Affected Branches:
      MOODLE_20_STABLE
    • Rank:
      282

      Description

      I can't find any way to delete a file once it has been uploaded. You can delete the file from the HTML editor but the file is still in the Repository. There seems to be no delete option in the File Picker.

      Also, if you upload an image then modify or update the image, you have to change the name of the image to see it in your editor. I discovered that this is a cashe issue and if you dump your cashe, then the new version (under the same name) will be displayed. Is there a way to automatically refresh the cashe when you upload an edited file to the Repository. This would avoid a lot of confussion and frustration.

      Thanks,
      Clarence

        Issue Links

          Activity

          Hide
          Ray Guo added a comment -

          I am now looking at this issue on Monday Moodle bug fixing.
          Ray

          Show
          Ray Guo added a comment - I am now looking at this issue on Monday Moodle bug fixing. Ray
          Hide
          Clarence Prudhoe added a comment -

          Hello Ray,

          In an email conversation with Donsheng, he indicated that CRON checks for unused files in the Repository and deleats them automatically. He said not to wory about the server filling up with unused files because CRON would keep them cleaned out.

          I have not tried to varify this so I don't know if it is working.

          Thanks,
          Clarence

          Show
          Clarence Prudhoe added a comment - Hello Ray, In an email conversation with Donsheng, he indicated that CRON checks for unused files in the Repository and deleats them automatically. He said not to wory about the server filling up with unused files because CRON would keep them cleaned out. I have not tried to varify this so I don't know if it is working. Thanks, Clarence
          Hide
          Ray Guo added a comment -

          Bascially, when you insert an image in the html editor (by editing a forum post), it generates the following two lines in the moodle_files table

          79;"4648ddbb631f6ef9bb4bab2cf9120c0129f69be6";"7730de9bbc253b590bb777a28cf3333906c8e252";13;"user";"draft";535149425;"/";"ray.jpg";2;4093;"image/jpeg";0;"";"Ray Guo";"allrightsreserved";1289232218;1289232218;0

          80;"da39a3ee5e6b4b0d3255bfef95601890afd80709";"1d5e1a528ed10ef3d3a425ac7ec68739bde29176";13;"user";"draft";535149425;"/";".";2;0;"";0;"";"";"";1289232218;1289232218;0

          But when you remove this image by editing the post in the html editor and click the Post to forum button to post this message, the line 79 in the moodle_files table is not deleted. This means that the html edit doesn't delete the image even though the image has been removed and not showing in the post anymore.

          That will cause an error saying that the same file name already exist if you try to add the same image in this post again by inserting this image on the html editor. That is obvious as the image wasn't removed when you previously removed it from the html editor.

          This is an HTML editor bug.

          Show
          Ray Guo added a comment - Bascially, when you insert an image in the html editor (by editing a forum post), it generates the following two lines in the moodle_files table 79;"4648ddbb631f6ef9bb4bab2cf9120c0129f69be6";"7730de9bbc253b590bb777a28cf3333906c8e252";13;"user";"draft";535149425;"/";"ray.jpg";2;4093;"image/jpeg";0;"";"Ray Guo";"allrightsreserved";1289232218;1289232218;0 80;"da39a3ee5e6b4b0d3255bfef95601890afd80709";"1d5e1a528ed10ef3d3a425ac7ec68739bde29176";13;"user";"draft";535149425;"/";".";2;0;"";0;"";"";"";1289232218;1289232218;0 But when you remove this image by editing the post in the html editor and click the Post to forum button to post this message, the line 79 in the moodle_files table is not deleted. This means that the html edit doesn't delete the image even though the image has been removed and not showing in the post anymore. That will cause an error saying that the same file name already exist if you try to add the same image in this post again by inserting this image on the html editor. That is obvious as the image wasn't removed when you previously removed it from the html editor. This is an HTML editor bug.
          Hide
          Petr Škoda added a comment -

          reassigning to author of filepicker, Dongsheng please review...

          Show
          Petr Škoda added a comment - reassigning to author of filepicker, Dongsheng please review...
          Hide
          Dongsheng Cai added a comment -

          MDL-26388 solved the problem of the fileexists error, it will pop up a dialog to allow users overwrite/rename files, it will hit moodle 2.0.3

          Show
          Dongsheng Cai added a comment - MDL-26388 solved the problem of the fileexists error, it will pop up a dialog to allow users overwrite/rename files, it will hit moodle 2.0.3
          Hide
          Dongsheng Cai added a comment -

          Lower the priority of the issue, we provided overwriting existing feature to solve this.

          Show
          Dongsheng Cai added a comment - Lower the priority of the issue, we provided overwriting existing feature to solve this.
          Hide
          Dongsheng Cai added a comment -

          This issue was assigned to me automatically, however I will not be able to work on this issue in the immediate future. In order to create a truer sense of the state of this issue and to allow other developers to have chance to become involved, I am removing myself as the assignee of this issue.
          For more information, see http://docs.moodle.org/dev/Changes_to_issue_assignment

          Show
          Dongsheng Cai added a comment - This issue was assigned to me automatically, however I will not be able to work on this issue in the immediate future. In order to create a truer sense of the state of this issue and to allow other developers to have chance to become involved, I am removing myself as the assignee of this issue. For more information, see http://docs.moodle.org/dev/Changes_to_issue_assignment

            People

            • Votes:
              10 Vote for this issue
              Watchers:
              11 Start watching this issue

              Dates

              • Created:
                Updated: