Help
Everything you need to set up ShareExtManager, and what your server receives from the app.
- Getting started
- Adding a destination
- Send a test file
- Sharing
- History
- For server developers
- Error messages
Getting started
- Open ShareExtManager and tap + at the top right.
- Enter a name and the address of your server, choose the type and the sign-in, and tap Save.
- In the form, tap Send test file. When “The test file arrived” appears, the destination is ready.
- Now share a file, for example a photo from Photos, and choose ShareExtManager.
Adding a destination
| Field | Meaning |
|---|---|
| Type | HTTP/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. |
| Name | How the destination is called in the list and in the share dialog. |
| URL | The address, starting with http:// or https://; for WebDAV the address of the folder. Example: https://server.example/upload |
| HTTP method | POST or PUT (HTTP/HTTPS only). |
| HTTP body | Multipart 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 part | Multipart only. The app gives the part that holds the file this name (name). Your server has to expect the same name. Usually file. |
| Sign in | None, 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. |
| Headers | Additional 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. |
| Active | A 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
- ShareExtManager appears in the share menu of apps that hand over a file, for example Photos or the print preview (“Save as PDF”).
- In Safari the app is not offered for an ordinary web page, because that delivers only a link. Tap Options in the share menu and choose PDF. Then the page is shared as a PDF.
- If ShareExtManager is missing from the row of apps, scroll the top row all the way to the right, tap More and switch the app on.
- Several files go to the same destination one after the other. While sending, the dialog shows the progress.
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.
| Type | File | File name | File type |
|---|---|---|---|
| HTTP/HTTPS, multipart | in the part with the name you set | filename of the part | Content-Type of the part |
| HTTP/HTTPS, the file itself | the whole HTTP body | header Content-Disposition: attachment; filename="…" (RFC 6266) | Content-Type of the request |
| WebDAV | the whole HTTP body | last part of the URL | Content-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
| Message | What it means |
|---|---|
| The test file arrived / Uploaded | The 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 found | The server does not know the path. Check the URL, also whether the port is separated by a colon (:8080, not .8080). |
| 405: method not allowed | The server does not accept the chosen HTTP method here. Switch between POST and PUT. |
| The server refused the test file | The 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 reached | No 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://. |