CURL.SetInputPNG
----------------

Sets input to PNG data from the container value.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [CURL](component_CURL.md) | [2.5](newinversion25.md) | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |

MBS( "CURL.SetInputPNG"; curl; Data { ; Offset; Length } ) 

**MBS**( **"CURL.SetInputPNG";** /\* Sets input to PNG data from the container value. \*/  
**$curl**; /\* The CURL session handle. \*/   
**$Data**; /\* The container value with the data to upload. \*/   
**$Offset**; /\* Optional; The offset where to start within container.e.g. 0 \*/   
**$Length**) /\* Optional; Size of data to take from the container.  
Length of container data must be ≥ Length + Offset.e.g. 1024\*1024\*10 \*/ 

### Parameters

| Parameter | Description | Example | Flags |
|---|---|---|---|
| curl | The CURL session handle. | $curl |  |
| Data | The container value with the data to upload. |  |  |
| Offset | The offset where to start within container. | 0 | Optional |
| Length | Size of data to take from the container.   Length of container data must be ≥ Length + Offset. | 1024\*1024\*10 | Optional |

### Result

Returns "OK" on success.

### Description

Sets input to PNG data from the container value.  
Also sets input file length. You need to define input data for file uploads, http posts and http put operations.  
### Examples

Upload some PNG image from container to FTP Server:

 Set Variable \[$curl ; Value:MBS ("[CURL.New](CURLNew.md)")\]  
Set Variable \[$result ; Value:MBS ("[CURL.SetOptionURL](CURLSetOptionURL.md)"; $curl ; "ftp://test.test/test/hello.png")\]  
Set Variable \[$result ; Value:MBS ("[CURL.SetOptionUpload](CURLSetOptionUpload.md)"; $curl ; 1)\]  
Set Variable \[$result ; Value:MBS ("[CURL.SetOptionPassword](CURLSetOptionPassword.md)"; $curl ; CURL Test::Password )\]  
Set Variable \[$result ; Value:MBS ("[CURL.SetOptionUserName](CURLSetOptionUserName.md)"; $curl ; CURL Test::Name )\]  
Set Variable \[$result ; Value:MBS ("CURL.SetInputPNG"; $curl ; CURL Test::MyImage )\]  
Set Field \[CURL Test::Result ; MBS ("[CURL.Perform](CURLPerform.md)"; $curl )\]  
Set Field \[CURL Test::debug ; MBS ("[CURL.GetDebugMessages](CURLGetDebugMessages.md)"; $curl )\]  
Set Variable \[$result ; Value:MBS ("[CURL.Release](CURLRelease.md)"; $curl )\]  
### See also

- [CURL.AddInputPNG](CURLAddInputPNG.md)
- [CURL.New](CURLNew.md)
- [CURL.Perform](CURLPerform.md)
- [CURL.Release](CURLRelease.md)
- [CURL.SetInputGIF](CURLSetInputGIF.md)
- [CURL.SetInputJPEG](CURLSetInputJPEG.md)
- [CURL.SetInputPDF](CURLSetInputPDF.md)
- [CURL.SetInputText](CURLSetInputText.md)
- [CURL.SetOptionURL](CURLSetOptionURL.md)
- [CURL.SetOptionUserName](CURLSetOptionUserName.md)

### Release notes

- **Version 12.0**
    - Added Offset and Length parameters to [CURL.SetInputFile](https://www.mbsplugins.eu/CURLSetInputFile.shtml), [CURL.SetInputGIF](https://www.mbsplugins.eu/CURLSetInputGIF.shtml), [CURL.SetInputJPEG](https://www.mbsplugins.eu/CURLSetInputJPEG.shtml), [CURL.SetInputPDF](https://www.mbsplugins.eu/CURLSetInputPDF.shtml) and [CURL.SetInputPNG](https://www.mbsplugins.eu/CURLSetInputPNG.shtml) to only upload a portion of the container.
- **Version 10.5**
    - Fixed memory leaks in [CURL.SetInputJPEG](https://www.mbsplugins.eu/CURLSetInputJPEG.shtml), [CURL.SetInputPNG](https://www.mbsplugins.eu/CURLSetInputPNG.shtml), [CURL.SetInputPDF](https://www.mbsplugins.eu/CURLSetInputPDF.shtml), [CURL.SetInputGIF](https://www.mbsplugins.eu/CURLSetInputGIF.shtml) and [CURL.SetInputFile](https://www.mbsplugins.eu/CURLSetInputFile.shtml) not freeing container. Broken with 10.0.

### Blog Entries

- [MBS FileMaker Plugin, version 11.6pr2](https://www.mbsplugins.de/archive/2021-12-07/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)
- [Translating Insert from URL options for CURL to MBS Plugin calls](https://www.mbsplugins.de/archive/2020-12-14/Translating_Insert_from_URL_op/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 10.5pr7](https://www.mbsplugins.de/archive/2020-11-02/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

Created 18th August 2014 , last changed 3th December 2021

  
[CURL.SetInputPDF](CURLSetInputPDF.md) - [CURL.SetInputText](CURLSetInputText.md)

[HTML Version](CURLSetInputPNG.shtml)