NetTalk Central
NetTalk Web Server => Web Server - Ask For Help => Topic started by: Alberto on March 23, 2014, 04:35:35 AM
-
1- How to limit the size of the file the user is trying to upload and post an error message.
2- "Add File" text button are not been translated
3- "Uploaded" yellow message are not been translated
Thanks
-
>> 1- How to limit the size of the file the user is trying to upload
WebServer procedure, Security tab, Max POST size.
In 8.03 I've passed this setting to the widget, so it will "pre-warn" the user. I've also pushed the text fields you mentioned through the Translate method so you can translate them.
cheers
Bruce
-
Ok, thanks
What if I need this limet per user.
Where to set it for the actual session?
Thanks
-
you can override the setting (as you can all settings) in the form itself, in the embed point before the jQuery call.
-
ok, but I didnt find THAT option, all I see is:
p_web.SetOption(loc:options,'proc',lower('uImage'))
p_web.SetOption(loc:options,'field',p_web.nocolon('PIC:FILE_Upload'))
p_web.SetOption(loc:options,'autoUpload',1)
p_web.SetOption(loc:options,'addOnce',1)
p_web.SetOption(loc:options,'jQueryButtons',1)
p_web.SetOption(loc:options,'addText',p_web._jsok(p_web.site.AddFileButton.TextValue))
p_web.SetOption(loc:options,'addIcon','ui-icon-'&p_web.site.AddFileButton.jsIcon)
p_web.SetOption(loc:options,'addClass',p_web.site.AddFileButton.class)
p_web.SetOption(loc:options,'clearText',p_web._jsok(p_web.site.ClearFileButton.TextValue))
p_web.SetOption(loc:options,'clearIcon','ui-icon-'&p_web.site.ClearFileButton.jsIcon)
p_web.SetOption(loc:options,'clearClass',p_web.site.ClearFileButton.class)
p_web.SetOption(loc:options,'startText',p_web._jsok(p_web.site.StartFileButton.TextValue))
p_web.SetOption(loc:options,'startIcon','ui-icon-'&p_web.site.StartFileButton.jsIcon)
p_web.SetOption(loc:options,'startClass',p_web.site.StartFileButton.class)
p_web.SetOption(loc:options,'smallStartClass',p_web.site.StartFileButton.class)
p_web.SetOption(loc:options,'cancelText',p_web._jsok(p_web.site.CancelFileButton.TextValue))
p_web.SetOption(loc:options,'cancelIcon','ui-icon-'&p_web.site.CancelFileButton.jsIcon)
p_web.SetOption(loc:options,'cancelClass',p_web.site.CancelFileButton.class)
p_web.SetOption(loc:options,'smallCancelClass',p_web.site.CancelFileButton.class)
p_web.SetOption(loc:options,'removeText',p_web._jsok(p_web.site.RemoveFileButton.TextValue))
p_web.SetOption(loc:options,'removeIcon','ui-icon-'&p_web.site.RemoveFileButton.jsIcon)
p_web.SetOption(loc:options,'smallRemoveClass',p_web.site.RemoveFileButton.class)
p_web.SetOption(loc:options,'multiple',0)
! Start of "Set jQuery File Upload Options"
-
May be I must set...
p_web.MaxPostSize = 1000000 * 1024 * 1024
p_web._SitesQueue.Defaults.MaxPostSize = 1000000 * 1024 * 1024
??
-
As I said in my post....
"In 8.03"
Cheers
Bruce
-
MaxSize limit is working ok
"Add File" text still does not translate
-
Please dont forget to verify this in 8.04
Thanks
-
Add File is a standard button, so the translation for it is done the same as for all the standard buttons. (ie the buttons listed in the WebServer procedure.)
cheers
Bruce
-
May be the problema is that it appears as:
+ Add File
?
-
I think what Bruce is trying to tell you is to do like this in the procedure's GenerateForm embed:
p_web.site.AddFileButton.TextValue = 'Whatever'
Peter
- or maybe I just misunderstood the question ;D