You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
description: "Compress a WebP, JPEG, or PNG image using the TinyPNG API. [See the documentation](https://tinypng.com/developers/reference#compressing-images)",
11
-
version: "0.0.1",
8
+
version: "0.1.0",
12
9
type: "action",
13
10
props: {
14
11
tinypng,
15
-
url: {
16
-
propDefinition: [
17
-
tinypng,
18
-
"url",
19
-
],
20
-
},
21
12
file: {
22
13
propDefinition: [
23
14
tinypng,
@@ -26,36 +17,19 @@ export default {
26
17
},
27
18
},
28
19
asyncrun({ $ }){
29
-
if(!this.url&&!this.file){
30
-
thrownewError("You must provide either a URL or a file for compression.");
31
-
}
32
-
33
-
letdata;
34
-
letheaders={};
35
-
36
-
if(this.url){
37
-
data={
38
-
source: {
39
-
url: this.url,
40
-
},
41
-
};
42
-
}
43
-
44
-
if(this.file){
45
-
constfileData=this.file.split(".");
46
-
constext=fileData[1];
47
-
48
-
if(!IMAGE_TYPES.includes(ext)){
49
-
thrownewConfigurationError("You can upload either WebP, JPEG or PNG.");
Copy file name to clipboardExpand all lines: components/tinypng/tinypng.app.mjs
+2-9Lines changed: 2 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -5,17 +5,10 @@ export default {
5
5
type: "app",
6
6
app: "tinypng",
7
7
propDefinitions: {
8
-
url: {
9
-
type: "string",
10
-
label: "Image URL",
11
-
description: "URL of the image to compress (WebP, JPEG, or PNG).",
12
-
optional: true,
13
-
},
14
8
file: {
15
9
type: "string",
16
-
label: "Image File",
17
-
description: "The path to the image file (WebP, JPEG, or PNG) saved to the `/tmp` directory (e.g. `/tmp/example.jpg`). [See the documentation](https://pipedream.com/docs/workflows/steps/code/nodejs/working-with-files/#the-tmp-directory).",
18
-
optional: true,
10
+
label: "Image Path or URL",
11
+
description: "The image to upload (WebP, JPEG, or PNG). Provide either a file URL or a path to a file in the `/tmp` directory (for example, `/tmp/myFile.png`)",
Copy file name to clipboardExpand all lines: components/todoist/todoist.app.mjs
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -255,8 +255,8 @@ export default {
255
255
},
256
256
path: {
257
257
type: "string",
258
-
label: "File Path",
259
-
description: "Path to .csv file containing task data. Enter a static value (e.g., `/tmp/myFile.csv`) or reference prior step exports via the `steps` object (e.g., `{{steps.export_tasks.$return_value}}`).",
258
+
label: "File Path or URL",
259
+
description: "The .csv file to upload. Provide either a file URL or a path to a file in the `/tmp` directory (for example, `/tmp/myFile.csv`)",
0 commit comments