I can't seem to set a default value for a file field from a URL or any other method.

With IMCE it will let me narrow down to the file's directory but will not let me select a file.

I have tried all the file sources modules.
I cannot seem to find a way to do this with hook_form_alter

Comments

quicksketch’s picture

Title: Set a file field default value from URL » Set a file field default value using FileField Sources
Category: support » feature

We don't yet have this functionality. It's a bit of a problem because the configuration form for a particular file field is the same form where a default is set. So things like the attach directory or the attach behavior is not yet known at the time a default is set, which could lead to some unexpected behavior.

In any case, if we can come up with solutions to these problems, it would be a reasonable feature request, so I'm changing the category.

eminencehealthcare’s picture

As a workaround I use FileField source remote url and use the prepopulate module to fill it with the URL to the file.

quicksketch’s picture

Status: Active » Closed (duplicate)

Seems this is the same as #1177050: FileField Sources for default image field. Let's consolidate.

quicksketch’s picture

Issue summary: View changes

file field**