NetTalk Central

Recent Posts

Pages: [1] 2 3 ... 10
1
Hi Neils,

I have been uploading a file to a named subdirectory depending on the sending entity ( and their defined upload directory).  The trick is to use the Web handler to set the desired path...

In WebHandler
Rename file routine  - AFTER PARENT
***********************************

p_web.RenameFile PROCEDURE(STRING p_name,STRING p_filename,<String p_path>)

ReturnValue          ANY


  CODE
  ReturnValue = PARENT.RenameFile(p_name,p_filename,p_path)
  MESSAGE('pname ' & p_name)
  if p_name = 'upfilename'  ! uploading schedule file
      locpath = p_web.GSV('tProvRptDir')  ! this is the provider file
   !   message('report dir ' & locpath)
      locpath = clip(locpath) & '\INFILE\'  ! this adds teh Infile path
    !  message('upload path: ' & locpath)
      RETURNVALUE = Parent.RenameFile(p_name,p_filename,locpath)
      RETURN  RETURNVALUE
  END
 
*************************************
This makes sure that the file goes to the correct subdirectory.

SECOND- my subdirectories are already in place.  If you are creating one on the fly, you might go back and make sure that the app can see the newly created subdirectory before trying to write to it.

There are a few things for you to try - hope it gets you pointed in the right direction.
Ron Jolda
2
Hi

I have a form with a Redactor text field.
On each inserted record I create a directory in the uploads folder. My challenge is to insert the inserted images into the form subfolder.
I've tried with the option imageUpload: '/ uploads / XXXXX /' but I can't get that to work.
Then I have tried to look at the NetWebServerWorker._SendFile and replace it with my own code, but that gets messy - maybe I could make it work, but I dont understand the DisposeAndReturn Routine.
Anyone that have made something that works?

Regards Niels
3
FTP - Ask For Help / Re: time out error
« Last post by rob_bac on Today at 12:56:17 AM »
Hi Bruce,

Perfect, that wil do the trick.
4
Web Server - Ask For Help / Re: Rest webserver - updating only some fields
« Last post by Bruce on June 18, 2019, 11:25:28 PM »
Hi Jorge,

hmm. I see where you are coming from here, but I'll need to think about it. Basically you are thinking about an interface that is
action: update
guid: whatever
then  "some fields" - and whatever they send is then updated. (others are left unchanged.)

sort of like a SQL update statement, update (kilos=4) where guid = abc;

I'll let you know what I come up with.

cheers
Bruce
5
Web Server - Ask For Help / Re: Redactor - edit image in popup mode problem
« Last post by Bruce on June 18, 2019, 11:19:54 PM »
thanks for the example Niels, I'll check it out.
6
Web Server - Ask For Help / Re: https://sms.capesoft.com/
« Last post by Bruce on June 18, 2019, 11:19:24 PM »
It's currently being used for a small number of clients who seem to be happy with it.
I'm rolling it out slowly to make sure there are no surprises. If you want to give it a try, email me.

cheers
Bruce
7
Web Server - Ask For Help / Re: Error in site JavaScript
« Last post by Bruce on June 18, 2019, 11:18:27 PM »
"nts is not defined"

nts is declared in nt-websockets.js which implies you are using web socket functionality on one or more windows, but either;
a) you have not ticked on support for web sockets on the WebServer procedure, scripts tab or
b) you haven't run gzipall.bat since turning that on or
c) you have not deployedd the new all.js and all.js.gz

Cheers
Bruce
8
Web Server - Ask For Help / Re: Error in site JavaScript
« Last post by Bruce on June 18, 2019, 11:13:21 PM »
>> If it appears and stays there. The display of the web-page is also not formatted.

If that is the case then open developer tools in the browser, and take a look at the console there for the errors. If the error does not mean much to you then post a screen-shot here like Rene did.

Cheers
Bruce



 
9
Web Server - Ask For Help / Re: Deployment - theme.css.gz and standalone css files
« Last post by Bruce on June 18, 2019, 11:10:56 PM »
Hi Casey,

>> Wondering why the excluded common css are not in gzipped with the rest?  Or are they not common after all?

error.css is only sent with errors, is very small, and is the only css sent with an error. Sending all.css with an error would be massive overkill given that it includes all the css several KB worth, instead of just the few bytes with error.css.

the browser specific ones are not included, because, um, they are browser specific, so only sent depending on the browser the user is using. (To be fair we're approaching a time when these can go away as well - but that's some years away still.)

Cheers
Bruce

Pages: [1] 2 3 ... 10