4

I want to make use of the Media module and the File entity module to upload files, in particular images, to my site without having to attach them to a node. Solely uploading images works like a charm, as the Media module automatically places an "add file" link within the navigation menu.

I also added a couple of fields to my image file type. Unfortunately, the Media module doesn't allow me to choose the image file and fill in the fields at the same time, and then submit. Instead, I have to upload the file, go back to the file, click on edit and fill in the fields afterwards, which in my opinion is pretty annoying.

I am not sure if this issue can be resolved somehow. If it can not be, this could be a workaround:

When I upload a file, a rule is triggered that sends me to the edit page. This way uploading the image and filling in the fields somewhat forms a unit.

However, the Rules module does not offer to react on file uploads.

Does anyone have an idea how to get around this issue?

  • Update: The procedure described in the second part of my question (upload and get sent to the edit page immediately) can be realized by using File entity only and not Media. It is in fact the File entity module which places the "add file" link in the navigation menu. However, there are still some access permission issues with File entity that haven't been solved yet. For example, if you allow users to add files you automatically also allow them to delete anyone's uploaded files. – deinqwertz Oct 5 '12 at 9:11
0

So I believe that uploading and editing files works correctly with the latest dev release of the media module when using a file field or image field.

Like you said when you go to file/add it is using the file_entity module which I believe they are discussing adding upload and editing here http://drupal.org/node/1553114.

  • I actually ended up coding a custom form. This allows me to display all fields on a single page. – deinqwertz Nov 3 '12 at 13:04
0

You could also try the File Entity Inline module, which allows you to inline edit the files after they are uploaded.

Here is a quote about it (from the module's project page):

... aims to provide the ability to edit File entities inline, as part of another form (such as nodes). This should enable the ability for reusable and site-wide editing of file properties, such as description, alt text, captions, bylines, etc.

Configuration is on a per-field basis. So to configure this module, you must visit the "Manage Fields" tab for your content type (or taxonomy terms, comments, etc.) By default, all fields on all file types are displayed. If you want to make things like "description" and "alt text" global instead of per-usage, you should disable the built-in description and alt text fields and use those provided by a file type instead.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.