NetTalk Central

Author Topic: NT 11.04 PWA and File Upload issues  (Read 4774 times)

jking

  • Sr. Member
  • ****
  • Posts: 419
    • View Profile
    • Email
NT 11.04 PWA and File Upload issues
« on: January 22, 2019, 11:29:24 AM »
Bruce,

Now that I have the browse working as I like, I have moved on to my form, specifically uploading images.  I have set the FileUpload control as I had it in an earlier NT10 Web App.  Things don't seem to work like before.  For example, for debugging I have two message statements in code (SaveFile Routine).  These messages fire just as the entire app is loading, not during file upload.  I get no file name entered into the target field, in either the local store or the server tps file. 

Note, I'm running on the local development machine only, and the file does get uploaded to web\uploads folder.  However, the file name is not stored in the field of the tps file or the local store.  If I manually add a file and path to the tps file record, it syncs up with the local store but then the form will not open.  You should be able to see the setup I have in the sample app I sent you via email.

Any suggestions?

Thanks,

Jeff
« Last Edit: January 22, 2019, 04:35:21 PM by jking »

jking

  • Sr. Member
  • ****
  • Posts: 419
    • View Profile
    • Email
Re: NT 11.04 PWA and File Upload issues
« Reply #1 on: January 23, 2019, 11:33:19 AM »
Bruce,

In your NetTalk book, I saw a section that described "Incoming Files" and looked at the SaveFile Routine.  Here I added some code to display a message showing the contents of the "CC:Coin_Image_Name_Obv" field which should be loaded with the name of the uploaded file (See the attached image). 

The message indicates that it is, having the complete path to the file.  Still, after saving, the field in the local store and server tps file are blank.  The file is uploaded to the web\uploads folder as expected.  All other fields on the form do contain data when entered.  Perhaps all this must be handled with JavaScript?  Any thoughts?  You should already have a recent example app I sent that shows the file upload fields on page two of the update form.

Thanks,

Jeff

jking

  • Sr. Member
  • ****
  • Posts: 419
    • View Profile
    • Email
Re: NT 11.04 PWA and File Upload issues
« Reply #2 on: January 23, 2019, 12:36:34 PM »
Bruce,

I have been going through code, etc., trying to find where this has gone wrong.  In the attached image, the second error shows:

http://127.0.0.1:88/web/uploads/Capture.jpg

I think it should have been generated as:

http://127.0.0.1:88/uploads/Capture.jpg

Using the second URL, I can get the jpg file, not with the first URL.  I think this is being generated incorrectly with the "web" included in the URL.

I don't know what the third error is about.  Could one or both of these be related to the file upload not putting the file name into the target upload field?

Thanks,

Jeff

jking

  • Sr. Member
  • ****
  • Posts: 419
    • View Profile
    • Email
Re: NT 11.04 PWA and File Upload issues
« Reply #3 on: January 23, 2019, 08:11:13 PM »
Bruce,

I found the source of the Capture.jpg error, it was my error.  But I still can't get the uploaded file name into the target field and thus no image displays.  Still struggling.

Jeff

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: NT 11.04 PWA and File Upload issues
« Reply #4 on: January 28, 2019, 12:04:42 AM »
can you send me an updated example please Jeff so I can see what you've done on this side...