Come together with the global Drupal community in Rotterdam, 28 Sept – 1 Oct 2026. Sessions, contribution, connection, and Early Bird savings until 8 June.
Using the demo I can see how to embed a file or attach link within the TINYMCE body field. I'm wondering if it's possible to have the file attached to the node as a true attachment?
When I say "true" attachment, I mean like when you upload a file to a node using the built in drupal upload feature. When you do it this way, the upload is attached to the node and it can be presented as a file download at the bottom of the node.
WebFM also allows you to "attach" files to your node (see attachment).
I would like to use DBFM because I like the way you have integrated it with TinyMCE. So ideally, I would like to be able to embed and attach!
Thanks. One other benefit that occurred to me is that by attaching the file to the node in a formal way, you can expose the attachment to views. If I had the time and the skill I would take a crack this myself -- but alas -- I have neither!
You could also create a block that shows all the attachments to the node. This would allow you to place the block in any part of your site, not just at the bottom of the node.
Not really, we'd have to implement some way of tracking which nodes attachments were posted to. This is something that WebFM did, but we stripped that code away as we deemed it unnecessary for what we wanted to accomplish.
Sorry for so late a reply - I've never looked at this thread before.
I don't understand your need to 'really attach' a file. It would have been easy for me to leave in Rob's code (from webFM) to do attachments but it required extra space in the database and just seemed kinda unneccesary. rooey thought up the current method which seems to work just fine - you try embedding with webFM!
The way it's currently coded, if you've linked a file to any content (Page, Story etc.) all a client needs to do is click on the link and, on most browsers, you'll be given the choice of either opening the file (you choose the application) or Saving it to disc i.e Downloading. So what flavour of downloading did you want?
Regarding the blocks showing attachments to nodes. webfm does that already but we can't.
webfm has a seperate table that maps which files are attached to which nodes. We don't, the attachment is just html in the node body. It's simply not possible for dbfm to do it. If you need blocks or want to use views then webfm is the only way to go - you could always use a bit of css to make it look more like dbfm??
"I don't understand your need to 'really attach' a file."
Hi Geoff, it's really about controlling how file attachments are presented (via css) in the front end while at the same time gaining the benefits of the DBFM system. The WYSIWYG editor gives endusers too much freedom for a site with a really controlled front-end design. webFM handles this nicely.
"It would have been easy for me to leave in Rob's code (from webFM) to do attachments but it required extra space in the database and just seemed kinda unneccesary."
Oh. That's too bad! What if you could enable/disable the functionality if you were worried about extra space in the db?
"rooey thought up the current method which seems to work just fine - you try embedding with webFM!"
No question about that. You guys have done something really amazing here. Just wish you left in the original attachment functionality. I looked at the code and found it way too complex for me to knit the functionality back in.
Comments
Comment #1
rooey commentedDefine a "true" attachment, but probably not.
We've got two maintenance releases coming for 5.x.3.1 due out later tomorrow and 5.x.3.2 in a few weeks... Then it's on to 5.x.4.0 ie. search!
Comment #2
rooey commentedComment #3
mpaler commentedGood question -- perhaps I was a little vague.
When I say "true" attachment, I mean like when you upload a file to a node using the built in drupal upload feature. When you do it this way, the upload is attached to the node and it can be presented as a file download at the bottom of the node.
WebFM also allows you to "attach" files to your node (see attachment).
I would like to use DBFM because I like the way you have integrated it with TinyMCE. So ideally, I would like to be able to embed and attach!
Hope this makes sense...
Thanks
Mike
Comment #4
rooey commentedAh!
It's just another way of showing linked files - i'm not overly keen on the concept, but we'll consider it in future builds.
Comment #5
mpaler commentedThanks. One other benefit that occurred to me is that by attaching the file to the node in a formal way, you can expose the attachment to views. If I had the time and the skill I would take a crack this myself -- but alas -- I have neither!
Great module -- thanks for sharing it.
Mike
Comment #6
gmclelland commentedYou could also create a block that shows all the attachments to the node. This would allow you to place the block in any part of your site, not just at the bottom of the node.
-Glenn
Comment #7
rooey commentedThat would generate a crazy number of blocks on our systems - I sure as hell wouldn't want to administer that! :D
Comment #8
gmclelland commentedI meant just one block that could somehow be specific to each node(only show the files uploaded to that node). Not sure if that is possible.
Comment #9
rooey commentedNot really, we'd have to implement some way of tracking which nodes attachments were posted to. This is something that WebFM did, but we stripped that code away as we deemed it unnecessary for what we wanted to accomplish.
Comment #10
geoff_eagles commentedSorry for so late a reply - I've never looked at this thread before.
I don't understand your need to 'really attach' a file. It would have been easy for me to leave in Rob's code (from webFM) to do attachments but it required extra space in the database and just seemed kinda unneccesary. rooey thought up the current method which seems to work just fine - you try embedding with webFM!
The way it's currently coded, if you've linked a file to any content (Page, Story etc.) all a client needs to do is click on the link and, on most browsers, you'll be given the choice of either opening the file (you choose the application) or Saving it to disc i.e Downloading. So what flavour of downloading did you want?
Comment #11
geoff_eagles commentedRegarding the blocks showing attachments to nodes. webfm does that already but we can't.
webfm has a seperate table that maps which files are attached to which nodes. We don't, the attachment is just html in the node body. It's simply not possible for dbfm to do it. If you need blocks or want to use views then webfm is the only way to go - you could always use a bit of css to make it look more like dbfm??
closing now
Comment #12
mpaler commented"I don't understand your need to 'really attach' a file."
Hi Geoff, it's really about controlling how file attachments are presented (via css) in the front end while at the same time gaining the benefits of the DBFM system. The WYSIWYG editor gives endusers too much freedom for a site with a really controlled front-end design. webFM handles this nicely.
"It would have been easy for me to leave in Rob's code (from webFM) to do attachments but it required extra space in the database and just seemed kinda unneccesary."
Oh. That's too bad! What if you could enable/disable the functionality if you were worried about extra space in the db?
"rooey thought up the current method which seems to work just fine - you try embedding with webFM!"
No question about that. You guys have done something really amazing here. Just wish you left in the original attachment functionality. I looked at the code and found it way too complex for me to knit the functionality back in.
Oh well. Maybe in another life.
Mike