NetTalk Central

Author Topic: Flie Upload custom extensions  (Read 4537 times)

Alberto

  • Hero Member
  • *****
  • Posts: 1873
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Flie Upload custom extensions
« on: March 04, 2020, 09:59:49 AM »
Hi, trying to use FileUpload with *.csv files does not work.
Ive tryed using '*.csv' and 'csv' and nothing.
Please see pics
-----------
Regards
Alberto

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Flie Upload custom extensions
« Reply #1 on: March 06, 2020, 06:57:05 AM »
'csv' would be the right thing to choose.
This doesn't affect the lookup dialog, it only limits the files that will actually be uploaded.

Incidentally notice how your screen and file selection is different to the example? suggests maybe you are missing CSS or JS or something.

cheers
Bruce

Alberto

  • Hero Member
  • *****
  • Posts: 1873
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Re: Flie Upload custom extensions
« Reply #2 on: March 09, 2020, 04:53:45 AM »
Quote
'csv' would be the right thing to choose.
This doesn't affect the lookup dialog, it only limits the files that will actually be uploaded.

even if I set 'csv' I can upload any file without any warning or limit.
« Last Edit: March 09, 2020, 06:42:45 AM by michelis »
-----------
Regards
Alberto

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Flie Upload custom extensions
« Reply #3 on: March 09, 2020, 10:24:05 PM »
post an example showing the effect, and I'll take a look.

cheers
Bruce

Alberto

  • Hero Member
  • *****
  • Posts: 1873
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Re: Flie Upload custom extensions
« Reply #4 on: March 10, 2020, 02:48:05 AM »
Attached goes example 72 (Progress) modified to show the problem and...
please let me know how to inform the user how went the import procedure, that is at the end of the import proc I need to inform of errors and so on.
Thanks
-----------
Regards
Alberto

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Flie Upload custom extensions
« Reply #5 on: March 11, 2020, 11:02:55 PM »
Regarding the CSv, I went to the docs to see what it said;

Accept Files of Type
--------------------
Tick on the options you want to support for file uploading. The user is still able to upload any file they like, but this setting gives the browser some clues as to which files are desirable and may filter the File Dialog to these options. Built-in common types are Audio, Video, Image, PDF and ZIP. This is also a Custom field which can contain a comma separated list of acceptable mime types. You can also use a .xxx extension (and hence a comma separated list of extensions) here. For example '.doc,.xls'

so it should be '.csv' not 'csv'

>> please let me know how to inform the user how went the import procedure, that is at the end of the import proc I need to inform of errors and so on.

Couple of options, but the easiest is to
a) put a DISPLAY field on the form. Set this to a field called say ImportResult.
b) At the end of ProcessMakefile do a SetSessionValue('ImportResult','Whatever you want to say')

Cheers
Bruce