NetTalk Central

Author Topic: NT8 file upload  (Read 4965 times)

Alberto

  • Hero Member
  • *****
  • Posts: 1873
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
NT8 file upload
« 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
« Last Edit: March 23, 2014, 05:18:54 AM by michelis »
-----------
Regards
Alberto

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: NT8 file upload
« Reply #1 on: March 24, 2014, 12:43:29 AM »
>> 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

Alberto

  • Hero Member
  • *****
  • Posts: 1873
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Re: NT8 file upload
« Reply #2 on: March 24, 2014, 12:50:29 AM »
Ok, thanks
What if I need this limet per user.
Where to set it for the actual session?
Thanks
-----------
Regards
Alberto

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: NT8 file upload
« Reply #3 on: March 24, 2014, 01:02:51 AM »
you can override the setting (as you can all settings) in the form itself, in the embed point before the jQuery call.

Alberto

  • Hero Member
  • *****
  • Posts: 1873
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Re: NT8 file upload
« Reply #4 on: March 24, 2014, 01:58:07 AM »
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"
-----------
Regards
Alberto

Alberto

  • Hero Member
  • *****
  • Posts: 1873
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Re: NT8 file upload
« Reply #5 on: March 24, 2014, 02:00:00 AM »
May be I must set...

  p_web.MaxPostSize = 1000000 * 1024 * 1024
  p_web._SitesQueue.Defaults.MaxPostSize = 1000000 * 1024 * 1024

??
-----------
Regards
Alberto

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: NT8 file upload
« Reply #6 on: March 24, 2014, 05:05:20 AM »
As I said in my post....

"In 8.03"

Cheers
Bruce

Alberto

  • Hero Member
  • *****
  • Posts: 1873
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Re: NT8 file upload 8.03
« Reply #7 on: March 25, 2014, 04:45:30 AM »
MaxSize limit is working ok

"Add File" text still does not translate

-----------
Regards
Alberto

Alberto

  • Hero Member
  • *****
  • Posts: 1873
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Re: NT8 file upload
« Reply #8 on: March 27, 2014, 03:51:11 AM »
Please dont forget to verify this in 8.04
Thanks
-----------
Regards
Alberto

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: NT8 file upload
« Reply #9 on: March 27, 2014, 05:21:42 AM »
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

Alberto

  • Hero Member
  • *****
  • Posts: 1873
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Re: NT8 file upload
« Reply #10 on: March 27, 2014, 05:24:14 AM »
May be the problema is that it appears as:

+ Add File

?
-----------
Regards
Alberto

peterH

  • Sr. Member
  • ****
  • Posts: 413
    • View Profile
Re: NT8 file upload
« Reply #11 on: March 27, 2014, 06:13:34 AM »
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
« Last Edit: March 27, 2014, 06:51:28 AM by peterH »