direct file uploader

hassan kalach asked on September 5, 2017 11:49

okay so how can i get the link of a file using macros expression.

Correct Answer

Prashant Verma answered on September 5, 2017 12:08

Hi Hassan,

Macro expression for

using file GUID

{% GetFileUrlByGUID(FieldName, "", "") %}

using column name

{%# GetFileUrl("FieldName") %}

Happy to help you

2 votesVote for this answer Unmark Correct answer

Recent Answers


hassan kalach answered on September 5, 2017 13:05 (last edited on September 5, 2017 13:07)

both solutions did not work please note i am use data type file and direct up loader as form control

0 votesVote for this answer Mark as a Correct answer

hassan kalach answered on September 5, 2017 13:05

the getFileUrl works well while using the ASCX option not while using text/xml

0 votesVote for this answer Mark as a Correct answer

Prashant Verma answered on September 5, 2017 14:03

With a TXT transformation, you can construct the link yourself, check below solution

<a href="~/getattachment/{%FileField%}/filename">link to the attachment</a>

I recommend you to first read this article and get some overview about the type of file upload form control behavior and type of data they capturing into database.

0 votesVote for this answer Mark as a Correct answer

hassan kalach answered on September 5, 2017 14:27

but where to get the filename from ?!

0 votesVote for this answer Mark as a Correct answer

hassan kalach answered on September 5, 2017 14:28

and what you stated is rlated to the attachment section i am using direct uploader file type

0 votesVote for this answer Mark as a Correct answer

Prashant Verma answered on September 5, 2017 14:33

You can get this using File (itemGUID)

see reference

0 votesVote for this answer Mark as a Correct answer

hassan kalach answered on September 5, 2017 14:39 (last edited on September 5, 2017 14:46)

bro i appreciate your help , i am uploading a pdf file using direct uploader and i need to have a link that downloads that file. i have this : <a href="" download><img src="/Kentico10/MOE/media/MOE-Images/download-stats.png">إضغط هنا لتنزيل الملف</a> the field name is "File" what should i add using macros to be able to download that file thank you

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.