Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
bugzilla
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
bugzilla
Commits
45cc062b
Commit
45cc062b
authored
Apr 28, 2011
by
Frédéric Buclin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 653404: Misleading error message when file to be attached is not readable by browser
r/a=LpSolit
parent
7e87fb5d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
attachment.cgi
attachment.cgi
+4
-1
No files found.
attachment.cgi
View file @
45cc062b
...
...
@@ -487,10 +487,13 @@ sub insert {
# Must be called before create() as it may alter $cgi->param('ispatch').
my
$content_type
=
Bugzilla::Attachment::
get_content_type
();
# Get the filehandle of the attachment.
my
$data_fh
=
$cgi
->
upload
(
'data'
);
my
$attachment
=
Bugzilla::
Attachment
->
create
(
{
bug
=>
$bug
,
creation_ts
=>
$timestamp
,
data
=>
scalar
$cgi
->
param
(
'attach_text'
)
||
$
cgi
->
upload
(
'data'
)
,
data
=>
scalar
$cgi
->
param
(
'attach_text'
)
||
$
data_fh
,
description
=>
scalar
$cgi
->
param
(
'description'
),
filename
=>
$cgi
->
param
(
'attach_text'
)
?
"file_$bugid.txt"
:
scalar
$cgi
->
upload
(
'data'
),
ispatch
=>
scalar
$cgi
->
param
(
'ispatch'
),
...
...
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