Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
B
beego
Project
Project
Details
Activity
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
beego
Commits
5c18d02b
Commit
5c18d02b
authored
Jan 04, 2016
by
astaxie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix #1268
parent
3bb22d14
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
httplib.go
httplib/httplib.go
+4
-4
No files found.
httplib/httplib.go
View file @
5c18d02b
...
...
@@ -82,7 +82,7 @@ func NewBeegoRequest(rawurl, method string) *BeegoHTTPRequest {
var
resp
http
.
Response
u
,
err
:=
url
.
Parse
(
rawurl
)
if
err
!=
nil
{
log
.
Fatal
(
err
)
log
.
Println
(
"Httplib:"
,
err
)
}
req
:=
http
.
Request
{
URL
:
u
,
...
...
@@ -334,17 +334,17 @@ func (b *BeegoHTTPRequest) buildURL(paramBody string) {
for
formname
,
filename
:=
range
b
.
files
{
fileWriter
,
err
:=
bodyWriter
.
CreateFormFile
(
formname
,
filename
)
if
err
!=
nil
{
log
.
Fatal
(
err
)
log
.
Println
(
"Httplib:"
,
err
)
}
fh
,
err
:=
os
.
Open
(
filename
)
if
err
!=
nil
{
log
.
Fatal
(
err
)
log
.
Println
(
"Httplib:"
,
err
)
}
//iocopy
_
,
err
=
io
.
Copy
(
fileWriter
,
fh
)
fh
.
Close
()
if
err
!=
nil
{
log
.
Fatal
(
err
)
log
.
Println
(
"Httplib:"
,
err
)
}
}
for
k
,
v
:=
range
b
.
params
{
...
...
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