Try Utility
View Code
View Feedback
Credits

POST Request and File Upload Example

A simple Python script demonstrating how to handle an uploaded file and POST requests in your utility. All POST requests and uploaded files are written to a file called "da.ta" in your utility's directory. At that point, you can do what you would like with it. If the file does not exist, this means that the request was sent via GET, which means you can use standard arguments. Otherwise, if it exists, you load 'da.ta' and process it how you like.

In this example, we simply load the received file and send it back in a text file, regardless of its contents.

brdane's Profile Picture
Author: brdane
Returns: A 'txt' file
Calling Method(s): , POST, UPLOAD
Coded in: Python

Utility Output:

Example URL:
Try

https://fech.space/post-and-file-ex/