api2convert 10.3.0 → 10.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +29 -0
- data/lib/api2convert/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 050c52e2ed3addf46de0b0008d0a233c49001ff7b65e437a73288687b48b2142
|
|
4
|
+
data.tar.gz: 0dc7d74ea29cd2f98c618f31ef177766aaeeb3590ca2acc3df569201f1270602
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f6b0bcd3554022246ae7b99d8c52a65d6f8d122772ec397865592437470c35ff92663baebc8957c4227c4bee85ffdcae23829abc05822aa023dcf71abe81819b
|
|
7
|
+
data.tar.gz: c440475c94830650a2f9d81ef1a0573fafa05892cbea86c83812ade8528714ec812fb9441b8b7cb7f423a58b7e337b3e9b1639d365609d42cb7885d2e9ad4101
|
data/README.md
CHANGED
|
@@ -87,6 +87,35 @@ rescue Api2Convert::SignatureVerificationError
|
|
|
87
87
|
end
|
|
88
88
|
```
|
|
89
89
|
|
|
90
|
+
## Cloud storage
|
|
91
|
+
|
|
92
|
+
Read an input straight from your own cloud storage, and/or deliver the output
|
|
93
|
+
into a bucket — no local upload or download in between (shipped in 10.3.0).
|
|
94
|
+
|
|
95
|
+
```ruby
|
|
96
|
+
# Input from S3: import the source and save the converted result locally
|
|
97
|
+
input = Api2Convert::Model::CloudInput.amazon_s3(
|
|
98
|
+
bucket: "my-bucket",
|
|
99
|
+
file: "invoices/report.docx",
|
|
100
|
+
accesskeyid: "AKIA…",
|
|
101
|
+
secretaccesskey: "…"
|
|
102
|
+
)
|
|
103
|
+
client.convert(input, "pdf").save("report.pdf")
|
|
104
|
+
|
|
105
|
+
# Output to S3: deliver the result into a bucket (generic OutputTarget)
|
|
106
|
+
target = Api2Convert::Model::OutputTarget.of(
|
|
107
|
+
Api2Convert::CloudProvider::AMAZON_S3,
|
|
108
|
+
parameters: { "bucket" => "my-bucket", "file" => "out/report.pdf" },
|
|
109
|
+
credentials: { "accesskeyid" => "AKIA…", "secretaccesskey" => "…" }
|
|
110
|
+
)
|
|
111
|
+
client.convert("report.docx", "pdf", output_targets: [target])
|
|
112
|
+
# Delivered to the bucket — the job completes with no local output to save.
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
`azure`, `ftp` and `google_cloud` have matching input factories; output uses the
|
|
116
|
+
generic `OutputTarget` for every provider. Credentials are redacted in
|
|
117
|
+
`inspect`/errors and never printed.
|
|
118
|
+
|
|
90
119
|
## Error handling
|
|
91
120
|
|
|
92
121
|
```ruby
|
data/lib/api2convert/version.rb
CHANGED