Are there any plans to integrate with the Media module (http://drupal.org/project/media) to give users the change to link to a file by uploading or selecting a file from Media?

Thanks

Comments

bensnyder’s picture

Version: 7.x-1.x-dev » 7.x-2.x-dev

I think Media integration is essential. +1

bobodrone’s picture

This is a quick fix patch to support uploaded files with media module, ie files that are not in the file_usage table.
As is.
/ bobodrone

guedressel’s picture

Patch from bobodrone works fine for me.

anon’s picture

The patch from bobodrone is working, BUT it may has some security issues.

A bigger issue related to this is that we should use the entity API for querys, which will give us more flexibility and reduce crossmodule bugs. (This is a separete issue tho)

anon’s picture

Marked #1417128: EntityMalformedException as a duplicate.

bensnyder’s picture

Just checked out
git clone --branch 7.x-2.x-entityapi http://git.drupal.org/project/linkit.git

Nice stuff there! Ultimately though we're not going to want to hard link to files, i.e. "/sites/default/files/filename.extension" - right? And will it be compatible with Media 1.x and 2.x? Thoughts?

Thanks..!

anon’s picture

In that branch, there is possible to get results on files uploaded by the media module.
Not sure if this is what you asking for, or if you what something like the old IMCE integration Linkis has.

About the hard links, isnt that the only way to link to files? I mean Linkit is not a text filter and I have no intention do make it one as there are other modules doing this.

bensnyder’s picture

Allow me to explain... Let's consider this with Media 2.x.

Instead of linking statically:

/sites/default/files/media/tumbled-marble-marble-mosaic-border-foyer.jpg

It would be best if Linkit output:

file/123

Or directly to the file:

file/123/render  (Just an example of a link to the actual file, not the file page)

And a text filter like Pathologic would convert that on render to an absolute path. Perhaps:

http://www.example.com/sites/default/files/media/tumbled-marble-marble-mosaic-border-foyer.jpg

Maybe Media 2.x should provide the text filter?

Thanks.

anon’s picture

Ah, I see. Yes, this would be a nice feature.

WE just have to come up with an idea of how this should work, I mean if I dont have the media module installed, I will still be able to link to files (directly). And IF I have the media module install, I have the options to link to the file page and directly to the file.

Not sure how to handle this. Any ideas?

anon’s picture

Actually the file/123 paths is from File Entity

anon’s picture

Status: Active » Fixed

I have now merge in the new plugin system to 7.x-2.x dev which also includes the new plugins.
Now you will be albo to search for files, no matter what it was uploaded with.

You need to have File entity installed tho to have the file support.

File entity will create links to /file/[fid] as bensnyder said in 8#.

If there are any new problems, feel free to open this issue or create a new one.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

joelcollinsdc’s picture

So just confirming, the current linkit->media integration only supports linking to /file/FID paths? There is no option to specify a display mode for the media item? Is that capability available somewhere else that I am overlooking?

georgedamonkey’s picture

Status: Closed (fixed) » Active

Hello,

Is there a way to have a 'Open file browser' button that worked with the Media module? Ideally, I'd like to eliminate IMCE completely, and this would be a great feature of Linkit.

Thank you.

anon’s picture

Issue summary: View changes
Status: Active » Closed (fixed)

Don't kidnap this issue. Its fixed.