@@ -660,7 +660,7 @@ Here's an example that will open Reddit when the notification is clicked:
660
660
```
661
661
662
662
## Attachments
663
- You can send images and other files to your phone as attachments to a notification. The attachments are then downloaded
663
+ You can ** send images and other files to your phone** as attachments to a notification. The attachments are then downloaded
664
664
onto your phone (depending on size and setting automatically), and can be used from the Downloads folder.
665
665
666
666
There are two different ways to send attachments:
@@ -669,7 +669,7 @@ There are two different ways to send attachments:
669
669
* or by [ passing an external URL] ( #attach-file-from-a-url ) as an attachment, e.g. ` https://f-droid.org/F-Droid.apk `
670
670
671
671
### Attach local file
672
- To send an attachment from your computer as a file , you can send it as the PUT request body. If a message is greater
672
+ To ** send a file from your computer** as an attachment , you can send it as the PUT request body. If a message is greater
673
673
than the maximum message size (4,096 bytes) or consists of non UTF-8 characters, the ntfy server will automatically
674
674
detect the mime type and size, and send the message as an attachment file. To send smaller text-only messages or files
675
675
as attachments, you must pass a filename by passing the ` X-Filename ` header or query parameter (or any of its aliases
@@ -701,6 +701,7 @@ Here's an example showing how to upload an image:
701
701
PUT /flowers HTTP/1.1
702
702
Host: ntfy.sh
703
703
Filename: flower.jpg
704
+ Content-Type: 52312
704
705
705
706
<binary JPEG data>
706
707
```
@@ -750,15 +751,13 @@ Here's what that looks like on Android:
750
751
</figure >
751
752
752
753
### Attach file from a URL
753
- Instead of sending a local file to your phone, you can use an external URL to specify where the attachment is hosted.
754
+ Instead of sending a local file to your phone, you can use ** an external URL** to specify where the attachment is hosted.
754
755
This could be a Google Drive or Dropbox link, or any other publicly available URL. The ntfy server will briefly probe
755
756
the URL to retrieve type and size for you. Since the files are externally hosted, the expiration or size limits from
756
757
above do not apply here.
757
758
758
759
To attach an external file, simple pass the ` X-Attach ` header or query parameter (or any of its aliases ` Attach ` or ` a ` )
759
- to specify the attachment URL. It can be any type of file.
760
-
761
- Here's an example showing how to upload an image:
760
+ to specify the attachment URL. It can be any type of file. Here's an example showing how to upload an image:
762
761
763
762
=== "Command line (curl)"
764
763
```
@@ -820,7 +819,6 @@ Here's an example showing how to upload an image:
820
819
<figcaption >File attachment sent from an external URL</figcaption >
821
820
</figure >
822
821
823
-
824
822
## E-mail notifications
825
823
You can forward messages to e-mail by specifying an address in the header. This can be useful for messages that
826
824
you'd like to persist longer, or to blast-notify yourself on all possible channels.
0 commit comments