Siemens SIMATIC S7-1500 Function Manual page 119

Web server
Hide thumbs Also See for SIMATIC S7-1500:
Table of Contents

Advertisement

Web pages
3.15 User files
Uploading UserFiles to the SIMATIC memory card
The CPU makes a URL in the following format available so that you can upload UserFiles
automatically to the SIMATIC memory card of your CPU:
http[s]://[ip]/UserFiles?Action=UPLOAD
The following example shows how you can upload a UserFile to your HTML user page
automatically using JavaScript.
Replace the URL of the example by the correct IP address of the interface of your CPU at
this URL and use the appropriate transfer protocol (HTTP or HTTPS).
<html>
<head>
<title>UserFiles Upload</title>
</head>
<body>
<form method="POST"
action="https://192.168.2.132/UserFiles?Action=UPLOAD&E=1"
enctype="multipart/form-data">
</form>
</body>
</html>
When the upload of the UserFile is successful, the CPU returns the status code
If the UserFile already exists on the SIMATIC memory card, the CPU returns the status code
409 CONFLICT
Note
Access authorization to the CPU for uploading data
In order to download UserFiles to the CPU, the user must have write rights for the CPU. If
the user does not have the required rights, the CPU returns the status code
the HTTP Response.
Downloading UserFiles via Bash scripts
The following example shows how you can download UserFiles automatically from the CPU
using a Bash script. Replace the URL of the example by the correct IP address of the
interface of your CPU at this URL and use the appropriate transfer protocol (HTTP or
HTTPS).
wget --content-disposition -i
"http://192.168.2.132/UserFiles?Action=LIST"
118
<input type="file" name="File" />
<input type="submit" />
.
403 FORBIDDEN
Function Manual, 11/2019, A5E03484625-AG
.
201 CREATED
in
Web server

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Simatic et 200proSimatic et 200sp

Table of Contents