IMCE browser not displaying uploaded file

Category: 

  • 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?

4/17/14

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/images
sites/default/files/documents
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:

documents

Your files will end up in:

sites/default/files/documents

Which is accessible to the editor.

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

documents/uploads

And your files will end up in:

sites/default/files/documents/uploads

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.

4/30/14