Custom Uploads to Your 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 using the "Custom Upload" option. This requires you to implement server-side code (NodeJS, PHP, Ruby on Rails, ASP.net, etc.) on your server to receive the POST request.
Steps to Enable Custom Upload
- Open Settings:
- Press F1 or click the settings button to display the Settings dialog.
- Select Upload Tab:
- Go to the Upload tab.
- Choose Custom Upload:
- Select "Custom Upload" from the list of uploaders.
- Enter URL:
- Enter the URL that Sparkbooth should POST to on your server.
- Provide Credentials and Message:
Optionally, provide a username, password, and message.
Data Posted to the Server
Sparkbooth will POST the following multipart/form-data data to the URL:
- media: Binary image data. If base64, it 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 or from the name/email prompt.
Server Response
If you selected the JSON server response, the expected success response from the server should look like:
{ "status": true, "error": "error message if 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>