Forum Discussion
jwright47_23019
Nimbostratus
Oct 21, 2015Possible to read TIFF header and reject if format is incorrect?
Our clients upload TIFF images to our server. However, our app requires TIFF images of a particular resolution and compression.
This information is embedded in the TIFF header.
Is it possib...
Lucas_Thompson_
Oct 21, 2015Historic F5 Account
Certainly. iRules are a complete language, so essentially anything can be done.
Notifying the server might be problematic though.
Probably you'd be looking at something similar to:
- Get HTTP request (HTTP_REQUEST).
- Decide if it's the POST you're looking for (HTTP::method == 'POST', HTTP::header probably Content-Disposition filename matches whatever.tiff).
- If so, begin collecting the data (HTTP::collect xxx).
- Examine the body file header bytes for your required information (HTTP_REQUEST_DATA).
- If the information is correct, release the connection to the server (HTTP_RELEASE), upload proceeds as normal.
- If the information is not correct, (HTTP::respond) with some kind of user-facing error page
Here, the server would get no notification of the invalid upload but you could log it for future auditing.
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects