ShareExtManager

Help

Everything you need to set up ShareExtManager, and what your server receives from the app.

Getting started

  1. Open ShareExtManager and tap + at the top right.
  2. Enter a name and the address of your server, choose the type and the sign-in, and tap Save.
  3. In the form, tap Send test file. When “The test file arrived” appears, the destination is ready.
  4. Now share a file, for example a photo from Photos, and choose ShareExtManager.

Adding a destination

FieldMeaning
TypeHTTP/HTTPS sends to an address you set. WebDAV sends to a folder: the app appends the file name to the address and sends the file with PUT.
NameHow the destination is called in the list and in the share dialog.
URLThe address, starting with http:// or https://; for WebDAV the address of the folder. Example: https://server.example/upload
HTTP methodPOST or PUT (HTTP/HTTPS only).
HTTP bodyMultipart form: the file is one part of a form (multipart/form-data, RFC 7578), like in a web form. The file itself: the file is the whole HTTP body.
Name of the partMultipart only. The app gives the part that holds the file this name (name). Your server has to expect the same name. Usually file.
Sign inNone, Username and password (HTTP Basic) or Bearer token. The password or token is kept in your device’s keychain. With the switch Keep it only on this device it goes into no device backup; after a device change you then enter it again.
HeadersAdditional HTTP headers sent with every upload, for example X-Folder: inbox. The app sets Content-Type and Content-Length itself. Do not put passwords here: headers are stored unencrypted, use the sign-in.
Show in the share dialog“Offer for every file”, or only for images, PDF, movies, audio or other files. The dialog lists only destinations that accept all shared files.
ActiveA destination that is switched off stays saved but does not appear in the share dialog.

Above the fields the app explains briefly what they mean. At the bottom of the form, What the server receives shows an example of the real request, built from your input.

Send a test file

The button sends the file test.txt with the content Hello World exactly as your files will be sent later: with the HTTP method, HTTP body, part name, headers and sign-in from the form. If it arrives, your files will arrive too.

Note: the test file stays on the server. With WebDAV, an existing test.txt is overwritten.

Sharing

History

The History tab shows one line per share action with the destination, time and number of files. A symbol tells whether everything arrived (check mark) or a file failed (warning sign). Tap the line to see the single files with size and error text. Swipe a line to the left to delete it, or tap Clear at the top for the whole history. The menu at the top lets you filter by destination and group by day or destination. At most 200 entries are kept, on your device only.

For server developers: what your server receives

One request per file. In addition there is the sign-in (Authorization: Basic … or Bearer …) and the headers from the form.

TypeFileFile nameFile type
HTTP/HTTPS, multipartin the part with the name you setfilename of the partContent-Type of the part
HTTP/HTTPS, the file itselfthe whole HTTP bodyheader Content-Disposition: attachment; filename="…" (RFC 6266)Content-Type of the request
WebDAVthe whole HTTP bodylast part of the URLContent-Type of the request

For names with a quote, backslash or line break, the name is sent in filename safely encoded (%22 for a quote) and in addition exactly in filename*=UTF-8''….

Multipart

POST /upload HTTP/1.1
Host: server.example
Authorization: Basic <Base64 of username:password>
Content-Type: multipart/form-data; boundary=Boundary-1234

--Boundary-1234
Content-Disposition: form-data; name="file"; filename="Report.pdf"
Content-Type: application/pdf

…bytes of the file…
--Boundary-1234--

The file itself as the body

POST /upload HTTP/1.1
Host: server.example
Content-Type: application/pdf
Content-Disposition: attachment; filename="Report.pdf"

…bytes of the file…

WebDAV

PUT /dav/inbox/Report.pdf HTTP/1.1
Host: server.example
Content-Type: application/pdf

…bytes of the file…

iOS adds headers of its own, such as User-Agent, Accept-Language, Accept-Encoding and Content-Length, as well as Upload-Complete and Upload-Draft-Interop-Version (a draft for resumable uploads). A server that does not know them ignores them.

As an answer the app expects a status of 2xx (for example 200, 201 or 204). Anything else it reports as an error.

Error messages

MessageWhat it means
The test file arrived / UploadedThe server answered with 2xx.
Login refused (401, 403)The server can be reached but does not accept the username, password or token. Check the sign-in of the destination.
404: address not foundThe server does not know the path. Check the URL, also whether the port is separated by a colon (:8080, not .8080).
405: method not allowedThe server does not accept the chosen HTTP method here. Switch between POST and PUT.
The server refused the test fileThe server can be reached but refuses the file (for example because of its type, size or a missing field). The message shows the beginning of its answer.
The server reported an error (5xx)The problem is on the server.
The server cannot be reachedNo connection. Check the network and the address. For addresses in your local network, access for ShareExtManager must be allowed in iOS Settings under Privacy & Security ▸ Local Network. An http:// address works only in the local network; for servers on the internet use https://.