NetTalk Central

Author Topic: web26 example File Upload  (Read 3791 times)

Richard I

  • Sr. Member
  • ****
  • Posts: 416
    • View Profile
    • Email
web26 example File Upload
« on: March 13, 2025, 07:08:14 PM »
When running the example" File Upload" ,The message box is telling me on "Start" that the nominated  file is Uploaded and displays its size,
and for a larger file I can see the progress bar.
The file is not being uploaded to the webserver\uploads

In the webserver settings Scripts tab I have "File Upload" Ticked, ran Gzipall from here  OK compiled and run
What am I missing please?
Thanks
Richard NT 14.28

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11297
    • View Profile
Re: web26 example File Upload
« Reply #1 on: March 14, 2025, 07:30:45 AM »
not enough information or meaningful answer.
what kind of file are you uploading? How big is it?
is it set to save to disk?

I presume you are saying the _example_ app is not working for you?

Cheers
bruce

Richard I

  • Sr. Member
  • ****
  • Posts: 416
    • View Profile
    • Email
Re: web26 example File Upload
« Reply #2 on: March 14, 2025, 03:55:57 PM »
Thanks Bruce
Yes -  The Example "File Upload(26)"  is not working for me.

I have opened, checked the Scripts folder, run gzipall, compiled and run the Example 26 File Upload.

I can get a png image to save in the Uploads folder via the Gallery page.
On the documents page, I can load a file so that it displays "waiting" and I can get the subsequent message "uploaded".
I cannot get a document such as a PDF to save to the Uploads folder from the documents page.

I am not sure what the purpose of the other fields on the document page are ie
Name - is it in the format pic.jpg ? and
Hash - What is the hash field recording?
Do these fields need to be populated?

All files attempted are small 16 kb and are either  pdf tps or csv.
I am unfamiliar with your question "is it set to save to disk?"

The aim of incorporating this example into my online apps is to be able to upload a bank statement as a csv file  into a NT app and then manipulate it once there, as per a client request.

Cheers,

Richard NT 14.28



« Last Edit: March 15, 2025, 05:09:20 PM by Richard I »

Richard I

  • Sr. Member
  • ****
  • Posts: 416
    • View Profile
    • Email
Re: web26 example File Upload
« Reply #3 on: March 16, 2025, 05:10:59 PM »
I thought I would revisit the original unedited example 26 ( I normally work on a copied iteration) but on compiling I get 14 errors....

Error(3): cif$fileopen cfiImgCt.inc The system cannot find the path specified. - D:\Clarion11.1 Examples\nettalk\Web Server\FileUpload (26)\clw\web26.clw:1

On checking, The global extension "Activate Clarion FreeImage for this application" is loaded,

Not a lot of progress, so help would be appreciated please
Thanks
Richard
« Last Edit: March 16, 2025, 07:20:38 PM by Richard I »

rjolda

  • Sr. Member
  • ****
  • Posts: 354
    • View Profile
    • Email
Re: web26 example File Upload
« Reply #4 on: March 17, 2025, 03:18:53 PM »
Hi Richard,
I tested out example 26.  I had to delete the MEDIa vIEW FROM THE server as this threw two eerrors for unknown procedure...
It is not clear how this is supposed to work from just looking at it.  I did not get anywhere with the client.  I looked at the server app and tried to upload a mailbox picture.  Did not work.
I have not spent a lot of time with this example.
FWIW
Ron

Richard I

  • Sr. Member
  • ****
  • Posts: 416
    • View Profile
    • Email
Re: web26 example File Upload
« Reply #5 on: March 17, 2025, 04:25:48 PM »
Thanks Ron,

Interestingly, I am able to upload an image to the uploads folder, but not a document viz CSV file

Im not sure where to from here...
the problem I have is that on testing I get the messages that the File has been uploaded, but its not, or doesnt appear to be.
Ive done a search of the PC for a named CSV to see it was uploaded somewhere else....nothing.

I too deleted the Media from the documents page but in so doing, Im not sure whether the blob (document) is integral.
Im also  testing locally ie with  the amended example app uploading the file to  the same machine.
The only way I could get the example to compile without 14 errors was to delete the Free Image template.

I wonder whether the example only works as anticipated if its running from a secure https: site ? which my local pc is not.


Cheers
Richard

« Last Edit: March 17, 2025, 05:20:40 PM by Richard I »

Jane

  • Sr. Member
  • ****
  • Posts: 387
  • Expert on nothing with opinions on everything.
    • View Profile
    • Email
Re: web26 example File Upload
« Reply #6 on: March 17, 2025, 05:35:55 PM »
WOMM isn't much help, Richard.

But FWIW, I'm working on an in-house web app.  The part that's finished has the user select an Excel file, upload it to the uploads folder, from which it's parsed and uploaded to a SQL server and then manipulated there into several tables.

I didn't do anything fancy.  It just works.  (On localhost on my dev machine, which is not TLS).

Don't know if it's any use, but attached is a TXA for the Excel upload proc (but not the fileProcess proc that does the parsing and SQL stuff after it's uploaded to the web\uploads folder).

Maybe useful for some clue?  (Although there's a good bit of code in it related to my using the progress control in conjunction with my subsequent file-processing steps.)

jf

« Last Edit: March 17, 2025, 06:35:17 PM by Jane »

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11297
    • View Profile
Re: web26 example File Upload
« Reply #7 on: March 18, 2025, 02:27:51 AM »
Richard,
set up the example app to show the effect you are getting, and then post that example here.

Cheers
Bruce

Richard I

  • Sr. Member
  • ****
  • Posts: 416
    • View Profile
    • Email
Re: web26 example File Upload
« Reply #8 on: March 18, 2025, 11:49:34 AM »
Amended File Update example Bruce,

I have deleted the FreeImage template and removed the mailbox and gallery Forms
Everything else is out of the example 26  file.
Although the message "Uploaded" appears, no file of  any type is uploaded to the uploads folder

Thank you for your help
Richard

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11297
    • View Profile
Re: web26 example File Upload
« Reply #9 on: March 23, 2025, 09:56:01 PM »
The example is confused by the existence of the Doc:Name field twice on the form, once as a string and once as a file upload. I'll play around with that a bit, but in the meantime if you remove the second field then I think the form will work as you are expecting.

Richard I

  • Sr. Member
  • ****
  • Posts: 416
    • View Profile
    • Email
Re: web26 example File Upload
« Reply #10 on: March 23, 2025, 10:23:19 PM »
Many thanks Bruce.
regards,
Richard