IMCE browser not displaying uploaded file


  • Question

I've created a content type called Documentation, added a file field to it, and specified that files should be added to a subdirectory called, "documentation."

It seems like the file upload worked - I can view the PDF and it's in the subdirectory specified. However if I use the WYSIWYG editor to find a file on the site there's no files listed in that directory. Is this feature functional?


The WYSIWYG file browser is configured to show you a certain set of directories which you can use, all within sites/default/files:

sites/default/files/webform (used by webform for submitted file attachments)
sites/default/files/css_injector_images_image (used by CSS Injector)

While you can browse these directories, upload files into them, and delete files from them, you cannot read or update the parent directory, sites/default/files/ from the WYSIWYG file browser.

When you create a file field in a content type, the default location (when “public files” is selected and the directory field is left blank) is sites/default/files, so those files are not reachable from within the editor.

If you need a file attached to a content type to be accessible to the editor, set your content type definition to place the files into one of the directories, or a subdirectory of one of those directories, that are usable by the editor.

For example, if you put the following into the File Directory field:


Your files will end up in:


Which is accessible to the editor.

If you want them to go into a subfolder, you could enter something like this:


And your files will end up in:


And then you can link to them using the editor.

However, be careful with this, because if you remove the file from its associated node, or you delete the node, you’ll delete the file, and your links to it will break.