fnp
/
redakcja.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
51c6366
)
fix
author
Radek Czajka
<rczajka@rczajka.pl>
Tue, 22 Aug 2023 14:50:51 +0000
(16:50 +0200)
committer
Radek Czajka
<rczajka@rczajka.pl>
Tue, 22 Aug 2023 14:50:51 +0000
(16:50 +0200)
src/depot/publishers/woblink.py
patch
|
blob
|
history
diff --git
a/src/depot/publishers/woblink.py
b/src/depot/publishers/woblink.py
index
c373d81
..
83fb317
100644
(file)
--- a/
src/depot/publishers/woblink.py
+++ b/
src/depot/publishers/woblink.py
@@
-523,6
+523,10
@@
class Woblink(BasePublisher):
sleep(2)
def upload_file(self, woblink_id, filename, content, field_name, mime_type):
sleep(2)
def upload_file(self, woblink_id, filename, content, field_name, mime_type):
+ form_name = f'Upload{field_name}'
+ id_field = f'pub{field_name}ResId'
+ field_name = field_name.lower()
+
data = {
'pubId': woblink_id,
}
data = {
'pubId': woblink_id,
}
@@
-530,10
+534,6
@@
class Woblink(BasePublisher):
field_name: (filename, content, mime_type)
}
field_name: (filename, content, mime_type)
}
- form_name = f'Upload{field_name}'
- id_field = f'pub{field_name}ResId'
- field_name = field_name.lower()
-
response = self.session.post(
self.UPLOAD_URL % field_name,
data=self.with_form_name(data, form_name),
response = self.session.post(
self.UPLOAD_URL % field_name,
data=self.with_form_name(data, form_name),