If selecting a previous file, we'll be given a FID. We need to send the FID to the appropriate registered media hook to handle. For instance, if our element is an Attachment, it would go to Media Upload. Filefields would go to Media FileField, etc.

The appropriate resource field hook would need to handle it from there. For instance, Media Upload will need to store the FID in the node's ->attachment array, Media FileField into ->field_xyz[0]['fid'], etc.

Comments

aaron’s picture

Status: Active » Needs work

we now get the file, which needs to be processed at media_browser_submit in the media.module.

jmstacey’s picture

Assigned: Unassigned » jmstacey
Issue tags: +gsoc, +gsoc2009, +gsoc2009-jmstacey

The FID is currently not available at media_browser_submit for passing on to the registered handler. I plan to change the file list to use the FID rather than the filepath as the key after taking care of #480146: Move Media Hook Implementations out of media.module.

See also #480166: hook_media_action [actions and chaining], a Discussion on implementation which directly affects work done in this area.

aaron’s picture

Status: Needs work » Fixed

fixed

Status: Fixed » Closed (fixed)
Issue tags: -gsoc, -gsoc2009, -gsoc2009-jmstacey

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