Skip to content

Commit 0a49fe0

Browse files
committed
Add hosting imghippo.com
Update version info
1 parent 6faa614 commit 0a49fe0

File tree

5 files changed

+54
-4
lines changed

5 files changed

+54
-4
lines changed

Data/Favicons/imghippo.com.ico

4.54 KB
Binary file not shown.

Data/Scripts/imghippo.nut

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
function UploadFile(fileName, options) {
2+
local key = ServerParams.getParam("apiKey");
3+
if (key == "") {
4+
WriteLog("error", "[imghippo.com] API key not set!");
5+
return 0;
6+
}
7+
local name = ExtractFileName(fileName);
8+
local mime = GetFileMimeType(name);
9+
nm.setUrl("https://api.imghippo.com/v1/upload");
10+
nm.addQueryParam("api_key", key);
11+
nm.addQueryParam("format", "json");
12+
nm.addQueryParamFile("file", fileName, name, mime);
13+
nm.doUploadMultipartData();
14+
15+
if (nm.responseCode() == 200) {
16+
local sJSON = nm.responseBody();
17+
local t = ParseJSON(sJSON);
18+
if (t != null) {
19+
if ("success" in t && t.success) {
20+
options.setViewUrl(t.data.view_url);
21+
options.setDirectUrl(t.data.url);
22+
return 1;
23+
} else {
24+
if ("message" in t && t.message != null) {
25+
WriteLog("error", "[imghippo.com] " + t.message);
26+
}
27+
}
28+
}
29+
}
30+
31+
return 0;
32+
}
33+
34+
function GetServerParamList() {
35+
return {
36+
apiKey = "API key"
37+
}
38+
}

Data/servers.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@
115115
</Actions>
116116
<Result DownloadUrlTemplate="stub" ThumbUrlTemplate="stub"/>
117117
</Server>
118+
<!-- Blocked by RKN ? -->
118119
<Server Name="hostingkartinok.com" Authorize="1" Debug="0" WebsiteUrl="https://hostingkartinok.com" RegistrationUrl="https://hostingkartinok.com/register.php">
119120
<Actions>
120121
<Action Type="upload" Url="https://hostingkartinok.com/login.php" PostParams="autologin=1;email=$(_LOGIN);password=$(_PASSWORD);login=Войти" OnlyOnce="1" />
@@ -432,6 +433,11 @@
432433
</Actions>
433434
<Result DownloadUrlTemplate="stub"/>
434435
</Server>
436+
<Server Name="imghippo.com" Authorize="2" Type="image" Plugin="imghippo" NeedPassword="0">
437+
<Actions>
438+
</Actions>
439+
<Result ImageUrlTemplate="stub" DownloadUrlTemplate="stub"/>
440+
</Server>
435441
<!-- 429 Too Many Requests
436442
<Server Name="pasteboard.co" MaxThreads="1">
437443
<Actions>

Source/Image Uploader.rc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ FONT 8, "MS Shell Dlg", 400, 0, 0xCC
272272
BEGIN
273273
DEFPUSHBUTTON "&OK",IDOK,216,293,52,15
274274
LTEXT "build 1234\nUsing curl",IDC_IMAGEUPLOADERLABEL,158,25,101,20
275-
CTEXT "� 2007-2024 by Sergey Svistunov. All rights reserved.",IDC_STATIC,52,72,189,11
275+
CTEXT "� 2007-2024 Sergey Svistunov. All rights reserved.",IDC_STATIC,52,72,189,11
276276
CONTROL "",IDC_STATICLOGO,"Static",SS_BITMAP,37,18,15,13
277277
CTEXT "Image Uploader",IDC_IMAGEUPLOADERLABEL2,80,14,148,12
278278
RTEXT "VERSION",IDC_CURLINFOLABEL,77,25,68,9
@@ -1987,7 +1987,7 @@ BEGIN
19871987
VALUE "FileDescription", "Image Uploader"
19881988
VALUE "FileVersion", "1.3.3.0"
19891989
VALUE "InternalName", "Image Uploader"
1990-
VALUE "LegalCopyright", "Copyright 2007-2024 by Sergey Svistunov (https://svistunov.dev)"
1990+
VALUE "LegalCopyright", " 2007-2024 Sergey Svistunov (https://svistunov.dev)"
19911991
VALUE "OriginalFilename", "Image Uploader.exe"
19921992
VALUE "ProductName", "Image Uploader"
19931993
VALUE "ProductVersion", "1.3.3.0"

Source/ShellExt/ExplorerIntegration.rc

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,10 @@ BEGIN
6868
BLOCK "040904e4"
6969
BEGIN
7070
VALUE "Comments", "Image Uploader shell extension"
71-
VALUE "FileDescription", "Image Uploader 1.3.x shell extension"
71+
VALUE "FileDescription", "Image Uploader 1.4.x shell extension"
7272
VALUE "FileVersion", "1.1.0.2"
7373
VALUE "InternalName", "ExplorerIntegration.dll"
74-
VALUE "LegalCopyright", "Copyright 2009-2019 Sergey Svistunov"
74+
VALUE "LegalCopyright", " 2009-2024 Sergey Svistunov"
7575
VALUE "OriginalFilename", "ExplorerIntegration.dll"
7676
VALUE "ProductName", "Image Uploader"
7777
VALUE "ProductVersion", "1.3.2.0"
@@ -90,8 +90,10 @@ END
9090
//
9191

9292
IDR_EXPLORERINTEGRATION REGISTRY "ExplorerIntegration.rgs"
93+
9394
IDR_ISHELLCONTEXTMENU REGISTRY "IShellContextMenu.rgs"
9495

96+
9597
/////////////////////////////////////////////////////////////////////////////
9698
//
9799
// Icon
@@ -100,10 +102,14 @@ IDR_ISHELLCONTEXTMENU REGISTRY "IShellContextMenu.rgs"
100102
// Icon with lowest ID value placed first to ensure application icon
101103
// remains consistent on all systems.
102104
IDI_ICONINFO ICON "Res\\icon-info-16px.ico"
105+
103106
IDI_ICONMOVIE ICON "Res\\icon-movie-16px.ico"
107+
104108
IDI_ICONUPLOAD ICON "Res\\icon-upload-16px.ico"
109+
105110
IDI_ICONMAIN ICON "..\\Res\\new-icon.ico"
106111

112+
107113
/////////////////////////////////////////////////////////////////////////////
108114
//
109115
// String Table

0 commit comments

Comments
 (0)