Uploading to Custom Server
Note: This feature requires you to implement server-side code on your server. We do not provide support for this.
Sparkbooth can upload photos to a custom server with the "Custom Upload" option. This requires that you implement server-side code (PHP, Ruby on Rails, ASP.net, etc.) on your server to receive the post. To select this option:
- Press F1 or press the settings button to display the Settings dialog
- Select the Upload tab
- Select "Custom Upload" from the list of uploaders.
- Enter the URL that Spark Booth should POST to on your server.
- You can provide a username, password and message.
Sparkbooth will POST the following multipart/form-data data to the URL
- media - Binary image data. If base64, assumption is media contains base64 image data
- username - String username from custom upload settings
- password - String password from custom upload settings
- name - String from name prompt
- email - String from email prompt
- message - String from custom upload settings. Will use message from name/email prompt
If you selected the JSON server response, the expected success response from the server should look like:
{
"status": true | false,
"error": "error message is not successful",
"url": "optional url link to the photo used for QR code feature"
}
If you selected the XML server response, the expected success response from the server should look like:
<?xml version="1.0" encoding="UTF-8"?>
<rsp status="ok" url="optional url link to the photo used for QR code feature" />
The failed response should look like:
<?xml version="1.0" encoding="UTF-8"?>
<rsp status="fail" >
<err msg="Your error message here" />
</rsp>
Example PHP server-side code.
Example ASP.net server-side code.