question

Shinya O avatar image
1 Like"
Shinya O asked Shinya O commented

FlexSim Webserver Uploading Model

Hi,

I am using flexsim webserver with the following settings. The version of the webserver is 24.1.0.

As you can see in the gif below, the webserver itself is working, but I am having trouble uploading the model. Can you help me?

# This file needs to be in the same directory as flexsimserver.bat


General:
    Flexsim Program Directory:      %PROGRAMFILES%\FlexSim 2024 Update 1\program
    Model Directory:                C:\Users\username\Documents\FlexSimWebServerModelDirectory
    Port:                           8080
    Reply Timeout (milliseconds):   10000
    Max Instances (of Flexsim):     8
    Max Threads Per Instance:       max
    Ignore Auto Save Files:         yes
    Headless Instances:             yes
Remote Operations (security hazards):
    Model Uploading:                yes
    Model Downloading:              no
    Model Deleting:                 no
    Max Upload Size (bytes):        10000000
Jobs:
    Flexsim Data Directory:         %AllUsersProfile%\FlexSim\FlexSim24.1
    Max Job Queue Length:           100
    Max Job Timeout (seconds):      3600
Windows Authentication:
    Use Windows Authentication:     no
    Restrict UserGroup Directories: no
    Active Directory:
        url:                        ldap://dc.domainName.com
        baseDN:                     dc=domainName,dc=com
        username:                   [email protected]
        password:                   password
Session:
    Enable:                         no
    Secret:                         flexsim secret
    Max Age (seconds):              3600

flexsimwebserver-uploadingmodel.gif

Thanks in advance.

FlexSim 24.1.1
flexsim webservermodel uploading
· 5
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Jason Lightfoot avatar image Jason Lightfoot ♦♦ commented ·
Is that a valid path for the model directory? You have an account whose user name is 'username' ?
0 Likes 0 ·
Shinya O avatar image Shinya O Jason Lightfoot ♦♦ commented ·

Although it is rewritten as "username" to hide my user name, the correct user name and Model Directory are set in the actual configuration.

The gif shows selecting the model in that directory and running the instance.

If the model is successfully uploaded, the model will be added to the Model Directory, right?

0 Likes 0 ·
Jason Lightfoot avatar image Jason Lightfoot ♦♦ Shinya O commented ·

What permissions does the user directory have? Are you running IIS or the executable webserver?

0 Likes 0 ·
Show more comments

1 Answer

Jordan Johnson avatar image
1 Like"
Jordan Johnson answered Shinya O commented

I found three issues:

  1. I was unable to open a model using the webserver using FlexSim 2024 Update 1. Only Update 2 seems to work. I wonder if we fixed some bugs that broke compatibility with 24.1.
  2. In server.js, the following line needs to be changed:
    // remove "new" from this line, near 464
    busboy = Busboy({ headers: req.headers });
  3. In queryhandlers.js, the following line needs to be changed:
    // add .filename after file.name, near 337
    file.mv(settings.general.modelDirectory + '/' + file.name.filename, function(err) {
                       

After making those changes, I was able to upload and run a model. I'll add this question to the dev list so we can make these changes for everyone. @Jacob Gillespie may have more/better information.

· 1
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Shinya O avatar image Shinya O commented ·

Thank you for your information. After making those changes, it works well.

0 Likes 0 ·