Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
G
gajim-plugins
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Evert Mouw
gajim-plugins
Commits
b6dee2ad
Commit
b6dee2ad
authored
8 years ago
by
Philipp Hörist
Browse files
Options
Downloads
Plain Diff
Merge branch 'master' into 'master'
Version 0.4.2 See merge request !10
parents
f6e76280
f535297c
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
httpupload/httpupload.py
+14
-18
14 additions, 18 deletions
httpupload/httpupload.py
httpupload/manifest.ini
+2
-2
2 additions, 2 deletions
httpupload/manifest.ini
with
16 additions
and
20 deletions
httpupload/httpupload.py
+
14
−
18
View file @
b6dee2ad
...
...
@@ -282,13 +282,10 @@ class Base(object):
account
=
self
.
chat_control
.
account
for
plugin
in
gajim
.
plugin_manager
.
active_plugins
:
if
type
(
plugin
).
__name__
==
'
OmemoPlugin
'
:
omemo
=
plugin
break
if
omemo
:
state
=
omemo
.
get_omemo_state
(
account
)
log
.
info
(
'
Encryption is:
'
+
str
(
state
.
encryption
.
is_active
(
jid
)))
return
state
.
encryption
.
is_active
(
jid
)
state
=
plugin
.
get_omemo_state
(
account
)
log
.
info
(
'
Encryption is:
'
+
str
(
state
.
encryption
.
is_active
(
jid
)))
return
state
.
encryption
.
is_active
(
jid
)
log
.
info
(
'
Encryption is: False / OMEMO not found
'
)
return
False
...
...
@@ -381,8 +378,12 @@ class Base(object):
return
def
upload_complete
(
response_code
):
if
response_code
==
0
:
return
# Upload was aborted
if
isinstance
(
response_code
,
str
):
# We got a error Message
ErrorDialog
(
_
(
'
Error
'
),
response_code
,
transient_for
=
self
.
chat_control
.
parent_win
.
window
)
return
if
response_code
>=
200
and
response_code
<
300
:
log
.
info
(
"
Upload completed successfully
"
)
xhtml
=
None
...
...
@@ -478,15 +479,10 @@ class Base(object):
transfer
=
urllib2
.
urlopen
(
request
,
timeout
=
30
)
log
.
debug
(
"
urllib2 upload request done, response code:
"
+
str
(
transfer
.
getcode
()))
return
transfer
.
getcode
()
except
UploadAbortedException
:
log
.
info
(
"
Upload aborted
"
)
except
:
progress_window
.
close_dialog
()
ErrorDialog
(
_
(
'
Could not upload file
'
),
_
(
'
Got unexpected exception while uploading file (see error log for more information)
'
),
transient_for
=
self
.
chat_control
.
parent_win
.
window
)
raise
# fill error log with useful information
return
0
except
Exception
as
error
:
gobject
.
idle_add
(
progress_window
.
close_dialog
)
log
.
exception
(
'
Error
'
)
return
str
(
error
)
log
.
info
(
"
Uploading file to
'
%s
'
...
"
%
str
(
put
.
getData
()))
log
.
info
(
"
Please download from
'
%s
'
later...
"
%
str
(
get
.
getData
()))
...
...
This diff is collapsed.
Click to expand it.
httpupload/manifest.ini
+
2
−
2
View file @
b6dee2ad
[info]
name:
HttpUpload
short_name:
httpupload
version:
0.4.
1
version:
0.4.
2
description:
This
plugin
is
designed
to
send
a
file
to
a
contact
or
muc
by
using
httpupload.<br/>
Your
server
must
support
<a
href
=
"http://xmpp.org/extensions/xep-0363.html">XEP-0363: HTTP Upload</a>.<br/>
Conversations
supported
this.<br/>
...
...
@@ -10,6 +10,6 @@ description: This plugin is designed to send a file to a contact or muc by using
If
the
receiving
side
doesn't
support
this,
only
a
text
message
containing
the
link
to
the
image
is
send.
authors:
Thilo
Molitor
<thilo@eightysoft.de>
Philipp
Hörist
<philipp@hoerist.com>
homepage:
https://
trac-plugins.gajim.org
/wiki/HttpUploadPlugin
homepage:
https://
dev.gajim.org/gajim/gajim-plugins
/wiki
s
/HttpUploadPlugin
min_gajim_version:
0.16.5
max_gajim_version:
0.16.9
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment