Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-23989

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

    Details

    • Type: Bug
    • Status: Open
    • Priority: 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

      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

        Gliffy Diagrams

          Issue Links

            Activity

            cprudhoe Clarence Prudhoe created issue -
            guoruicn Ray Guo made changes -
            Field Original Value New Value
            Assignee Dongsheng Cai [ dongsheng ] Ray Guo [ guoruicn ]
            Hide
            guoruicn Ray Guo added a comment -

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

            Show
            guoruicn Ray Guo added a comment - I am now looking at this issue on Monday Moodle bug fixing. Ray
            Hide
            cprudhoe 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
            cprudhoe 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
            guoruicn 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
            guoruicn 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.
            guoruicn Ray Guo made changes -
            Assignee Ray Guo [ guoruicn ] Petr ?koda (skodak) [ skodak ]
            Hide
            skodak Petr Skoda added a comment -

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

            Show
            skodak Petr Skoda added a comment - reassigning to author of filepicker, Dongsheng please review...
            skodak Petr Skoda made changes -
            Assignee Petr ?koda (skodak) [ skodak ] Dongsheng Cai [ dongsheng ]
            dougiamas Martin Dougiamas made changes -
            Fix Version/s 2.0.1 [ 10420 ]
            Fix Version/s 2.0 [ 10122 ]
            dougiamas Martin Dougiamas made changes -
            Workflow jira [ 38385 ] MDL Workflow [ 46678 ]
            dougiamas Martin Dougiamas made changes -
            Fix Version/s 2.0.2 [ 10421 ]
            Fix Version/s 2.0.1 [ 10420 ]
            dougiamas Martin Dougiamas made changes -
            Fix Version/s 2.0.3 [ 10537 ]
            Fix Version/s 2.0.2 [ 10421 ]
            stronk7 Eloy Lafuente (stronk7) made changes -
            Labels triaged
            Fix Version/s STABLE backlog [ 10463 ]
            Fix Version/s 2.0.3 [ 10537 ]
            dongsheng Dongsheng Cai made changes -
            Link This issue has been marked as being related by MDL-26832 [ MDL-26832 ]
            dougiamas Martin Dougiamas made changes -
            Workflow MDL Workflow [ 46678 ] MDL Full Workflow [ 74925 ]
            dongsheng Dongsheng Cai made changes -
            Link This issue will be resolved by MDL-26388 [ MDL-26388 ]
            Hide
            dongsheng 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 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
            dougiamas Martin Dougiamas made changes -
            Link This issue will be resolved by MDL-28019 [ MDL-28019 ]
            Hide
            dongsheng Dongsheng Cai added a comment -

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

            Show
            dongsheng Dongsheng Cai added a comment - Lower the priority of the issue, we provided overwriting existing feature to solve this.
            dongsheng Dongsheng Cai made changes -
            Priority Critical [ 2 ] Minor [ 4 ]
            Hide
            dongsheng 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 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
            dongsheng Dongsheng Cai made changes -
            Assignee Dongsheng Cai [ dongsheng ]
            Subversion JIRA

            Links Hierarchy

             Documentation

            Invalid license: EXPIRED

              People

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

                Dates

                • Created:
                  Updated: