In Dataforms a field type:file allows you to upload a file. I wish that %%form_raw{filefield}%% where "filefield" is a random name of the field choosen by designer of the form, would return a full URL starting with http://…, not category:filename/filename.extention
I wish for this because sometimes the file is located on an other site and the entered value of this field is an URL. So I wish it to be always an URL even if a file is uploaded. So only the prefix "http://objectid.wdfiles.com/local--files/" should be added if a user uploads a file.
So for example
"http://objectid.wdfiles.com/local--files/image:sandbad-1/sandbad.jpg"
instead of
"image:sandbad-1/sandbad.jpg"
Thanks for voting!
A - S I M P L E - P L A N by ARTiZEN a startingpoint for simple wikidot solutions.
I'm not sure I understand the wish - a 'file' field type accepts files, not URLs?
I think you're trying to make it possible to link directly to the image… but not sure how your solution achieves that goal…
~ Leiger - Wikidot Community Admin - Volunteer
Wikidot: Official Documentation | Wikidot Discord server | NEW: Wikiroo, backup tool (in development)
code like this would do the trick
A - S I M P L E - P L A N by ARTiZEN a startingpoint for simple wikidot solutions.
Yes, but that's for a URL field … how would it work if you were using a 'file' field type? It only allows you to upload files… so I don't understand how this would help to use external images as well? :S
~ Leiger - Wikidot Community Admin - Volunteer
Wikidot: Official Documentation | Wikidot Discord server | NEW: Wikiroo, backup tool (in development)
well just enter a url in the window that opens if you have to choose your file… you'll see it works fine.
Windows explorer = Internet explorer
A - S I M P L E - P L A N by ARTiZEN a startingpoint for simple wikidot solutions.
Last time I did that, it downloaded the file to a temporary directory on my hard drive, then uploaded to Wikidot from there.
I'll have another look - the behaviour may have been changed for some reason.
~ Leiger - Wikidot Community Admin - Volunteer
Wikidot: Official Documentation | Wikidot Discord server | NEW: Wikiroo, backup tool (in development)