Hi. I searched but I couldn't find a module that would let me add a field to a CCK content type that would let the user choose between uploading an image and adding a link to an external image (and have the link displayed as an
instead of a link, like it happens if I add a field of type link).
I mean, I could add two fileds: "Images (upload)" and "Images (add links)" but I can't do this either, since if I use a lik field for the second, I dont' no how to get it to spit out an
when the node is viewed (insted of just showing the link with some title.
It seems to me that this is something like a basic feature, adding an image field that would let you choose between "upload" and "add image url"...
Anyone este had the same problem (I imagine this is the case) ?
Can you please tell me how did you solve it?
Comments
Filefield Sources
Hi,
You could take a look at Filefield Sources - http://drupal.org/project/filefield_sources - which seems to accept remote URLs (It looks as though it will also copy those remote files to your Drupal site), but also allow you to upload a file or browse existing files.
thanks but...
Thanks, it seems like a nice module and I didn't come across it.
But copying remote files to my site is not acceptable performance/storage-wise for this project.
The idea is that I need the user to either:
- upload a file if the image is small (<500k), or...
- add the url of the file if it is larger than the filesize limit or if it is allready uploaded somewhere else (if the remote file is bigger that my upload limit, the FileField Sources module wouldn't help me)
It seems like a pretty common requirement, so I imagine someone else has had this very same problem...
...or not?
Copying optional?
I don't know the module well enough, but have you checked whether the remote copying is optional? If so, it would just be a remote URL field, and might do the trick.
2018 - just for the record - for people like me stumbling on
There is this nice module https://www.drupal.org/project/remote_file_source (I'm not related to it)
It's doing exactly the job you wanted.
Just wanted to note this here for people stumbling on this post from Google :)
So I guess anyone else who
So I guess anyone else who came across this issue solved it by hacking around the Link, FileField or FileField Sources CCK field modules or writing a custom module??!
...sad ...this seems such a basic requirement to me that it should be included in core (like cck and a lot of related modules should be too).
Increase Upload Limit
When I first had this issue, I noticed that my upload limit was very low at only 2mb, so I resolved it by raising that bar up to 16mb. Here is a post that describes how to do it using a php.ini file: http://drupal.org/node/97193
I have not yet had a complaint from any users. However, those giant JPG's don't ever make it to my public site, as I'm using and would recommend that you use the imagecache module to configure preset scale operations to your defined dimensions which in my case are typically way smaller in filesize, here:http://drupal.org/project/imagecache
Nope, this is not an option
Nope, this is not an option for me. I need to have "those big jpg's", and I need NOT TO store them on my website and/or display them on website when they are allready stored somewhere else.
Try the Embedded Media Field module.
One way to add an externally-hosted image is through the Embedded Image Field module, which is part of the Embedded Media Field module. (Some documentation, including a list of supported providers, can be found at http://drupal.org/node/184346.)
If you enable this module and add support for the providers you want (through
admin/content/emfield), you can then add an external image field to the content type. For the kind of situation described here, I'd recommend making one optional direct upload field and one optional third-party field. Then click the Display Fields tab of the relevant content type; that's where you can get it to "spit out" the image instead of a link.---
fureigh.com
fureigh on twitter and g.d.o.
In D7
In D7 this should be supplied by a supporting module of the Media Module. Here's the feature request:
http://drupal.org/node/1149008