mirror of
https://github.com/penpot/penpot.git
synced 2026-10-28 21:40:34 +00:00
🐛 Use multipart helper in jobs upload-chunk test
The multipart-only upload guard rejects the :content map sent by upload-chunked! over plain command!. Send it through multipart-command! like the other upload tests; forged-path tests stay on plain command!. AI-assisted-by: muse-spark-1.3-contributor
This commit is contained in:
parent
b633093336
commit
49aeeb053b
@ -249,17 +249,17 @@
|
||||
::rpc/profile-id (:id profile)
|
||||
:total-chunks 1})
|
||||
:result :session-id)
|
||||
out (th/command! {::th/type :upload-chunk
|
||||
::rpc/profile-id (:id profile)
|
||||
:session-id session-id
|
||||
:index 0
|
||||
:content (if (some? path)
|
||||
(let [size (.length (jio/file path))]
|
||||
{:filename "package.penpot"
|
||||
:path path
|
||||
:mtype "application/zip"
|
||||
:size size})
|
||||
(upload-chunk :content content))})]
|
||||
out (th/multipart-command! {::th/type :upload-chunk
|
||||
::rpc/profile-id (:id profile)
|
||||
:session-id session-id
|
||||
:index 0
|
||||
:content (if (some? path)
|
||||
(let [size (.length (jio/file path))]
|
||||
{:filename "package.penpot"
|
||||
:path path
|
||||
:mtype "application/zip"
|
||||
:size size})
|
||||
(upload-chunk :content content))})]
|
||||
(t/is (nil? (:error out)))
|
||||
session-id))
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user