Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
F
Ftt_Common
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
Ftt_Common
Commits
3b36f56b
Commit
3b36f56b
authored
Jul 20, 2021
by
tr
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
图片分离优化
parent
590bfc72
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
7 deletions
+13
-7
SegPicture.cs
Tools/MyUtils/SegPicture.cs
+13
-7
No files found.
Tools/MyUtils/SegPicture.cs
View file @
3b36f56b
...
...
@@ -314,13 +314,19 @@ namespace Tools.MyUtils
var
url
=
$"
{
this
.
BaseUrl
}
/PrepareUpload.aspx"
;
using
(
var
web
=
new
WebClient
())
{
web
.
Proxy
=
null
;
web
.
Headers
.
Add
(
"Content-Type"
,
"application/x-www-form-urlencoded"
);
var
sb
=
new
StringBuilder
();
sb
.
Append
(
"md5="
).
Append
(
this
.
Md5
);
var
bytes
=
web
.
UploadData
(
url
,
"POST"
,
Encoding
.
UTF8
.
GetBytes
(
sb
.
ToString
()));
var
content
=
Encoding
.
UTF8
.
GetString
(
bytes
);
return
content
==
"1"
;
try
{
web
.
Proxy
=
null
;
web
.
Headers
.
Add
(
"Content-Type"
,
"application/x-www-form-urlencoded"
);
var
sb
=
new
StringBuilder
();
sb
.
Append
(
"md5="
).
Append
(
this
.
Md5
);
var
bytes
=
web
.
UploadData
(
url
,
"POST"
,
Encoding
.
UTF8
.
GetBytes
(
sb
.
ToString
()));
var
content
=
Encoding
.
UTF8
.
GetString
(
bytes
);
return
content
==
"1"
;
}
catch
(
Exception
)
{
/*未请求到主机*/
}
return
false
;
}
}
/// <summary>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment