How do you delete or move a file in the Repository?

How do you delete or move a file in the Repository?

by Clarence Prudhoe -
Number of replies: 10
Maybe I missed the first day of class on the Repository, but I can't find any way to delete or move a file that has been uploaded via the File Picker.

I supposed if I could find the file, I could use FTP to manage these files, but that seems to defeat the purpose of the File Repository.

If there is a setting or command that I am missing, please enlighten me thoughtful

Clarence
Average of ratings: -
In reply to Clarence Prudhoe

Re: How do you delete or move a file in the Repository?

by Andrew Davis -
I've been wondering this myself. I've raised this in developer chat in the hopes of getting an answer from someone more intimately familiar with the new files system.
In reply to Clarence Prudhoe

Re: How do you delete or move a file in the Repository?

by Dongsheng Cai -
Hi, Clarence

Where are you using the file picker?

For forum attachments, if you uploaded one, you will be able to rename/remove it by file manager.

When you start a new forum post or edit an existing forum post, moodle will create a draft area for files, you can rename/remove file in this stage, after you hit the submit button, moodle will move the file to a proper location. Since moodle 2.0, you will not be able to manage moodle files by ftp or webdav, we store files in a file pool, the filepath and filename area generated by sha1 value of the file. If you move or delete it, moodle will not be able to find it.
Average of ratings: Useful (1)
In reply to Dongsheng Cai

Re: How do you delete or move a file in the Repository?

by Andrew Davis -
Thanks Dongsheng. I have a specific area I'm interested in. How do I delete course backups? I've created dozens of them in the the course of working on backup and restore but can't see a way to delete the ones I no longer require.
In reply to Dongsheng Cai

Re: How do you delete or move a file in the Repository?

by Clarence Prudhoe -

Hi Donsheng,

I found the file manager icon next to the file name in the edit mode of a forum post.  That works fine for file attachments, now that I now where to look smile.

However, what about images you have uploaded and incerted via the HTML editor? Or, how do you manage files if you create a hyperlink in the HTML editor and use the File Picker to upload files?  I don't see any way to delete these files.

Thanks for your help.

Clarence

In reply to Clarence Prudhoe

Re: How do you delete or move a file in the Repository?

by Reuben Rowntree -

Yes I have the same problem, how do you delete a file you have uploaded as part of an HTML description or on a page?

In reply to Reuben Rowntree

Re: How do you delete or move a file in the Repository?

by David Mudrák -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Plugins guardians Picture of Testers Picture of Translators
This is the key point of the new File API. To remove the embedded file from the page, just remove the image from the HTML editor. After re-save, it will be unlinked from the page. After some time, the garbage collector process shall find all stored files that are not referenced from any place for a long time and will trash them physically. But you can be never sure that the file is not referenced from an other place so you do not have the option to remove it on your own. Consider this mechanism as so called hard links known in common file systems.
Average of ratings: Useful (5)
In reply to David Mudrák

Re: How do you delete or move a file in the Repository?

by Derek Chirnside -

David, I think this is clear. This kind of comment needs to be captured somewhere (because I know I will need it sometime!!)

I checked out http://docs.moodle.org/en/Repositories

I was tempted to create a page http://docs.moodle.org/en/File picker

Any suggestions?

In reply to David Mudrák

Re: How do you delete or move a file in the Repository?

by David Bogner -
Picture of Core developers Picture of Plugin developers

Hi David,

thanks, that is interesting. That happens when I do the following:

  • upload images on front-page main menu via file picker
  • add these images in the editor on the front page
  • then i realize: images need to be improved (color is wrong)
  • i delete the old images - upload the new ones (same file names as the old, but the new improved images)

now i am in big trouble: new images are ignored and the old images are still displayed. i can't even add the new images, when i try to do this, the editor displays an error "file exists already" (translated from german).

So what is the fastest way to add new images? delete everything, rename all the pictures? that is quite user unfriendly, or more clearly: quite unusable. just uploading the changed files would be more efficient. (Bug or feature? wink)

Best regards,

David