WYSIWYG Insert media button also appears in blocks. In blocks you can not attach files, like in nodes. I thought to be smart by adding the file directly to the library with /file/add . To my suprise this apparently adds the file as Private:// stream and there is no choice presented to do otherwise.

How do I add media for blocks without creating a node with attachment?

Comments

ñull’s picture

Category: support » bug

Still no answer to this question. I cannot insert images in blocks at the moment because it introduces them as this way:

<p>[[{"type":"media","view_mode":"media_original","fid":"247","attributes":{"alt":"","class":"media-image","height":"80","width":"100"}}]]</p>

The resulting HTML is:

<img class="media-image" width="100" height="80" src="http://developdomain.com/system/files/logo.gif" alt="">

This proofs that media uploaded from a block ends up in the private file area. That's why I then don't see them and see "access denied". Is that for all media that is not attached to a node? What is responsible for this default? The media module or is it a Drupal default for all un-attached files?

This behaviour breaks the intuitive use the media button in WYSIWYG and I therefore changed it to a bug.

chris matthews’s picture

Component: WYSIWYG integration » Code
Issue summary: View changes
Status: Active » Closed (outdated)

Closing this issue as outdated. However, if you think this issue is still important, please let us know and we will gladly re-open it for review.
sincerely,
- the Drupal Media Team