question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

multipart limits values to one in pipe

See original GitHub issue

Problem: When using use(multipart$()), I can’t seem to expand the Observable with additional values beyond the multipart upload. For example:

const a$ = r.pipe(
    r.matchPath('a'),
    r.matchType('POST'),
    r.useEffect(Rx.pipe(
        use(multipart$()),
        // Expanding the Observables with additional values.
        Ro.combineLatest(Rx.from([1, 2, 3])),
        // Seems to only log once, apparently the last value in above array.
        Ro.tap(([upload, n]) => console.log(n)),
        Ro.count(),
        // Responds with 1. Should be 3.
        Ro.map(body => ({status: 200, body})),
    )),
)

I created a repository to reproduce the issue: https://github.com/tstelzer/marble-playground

node: v13.2.0 “@marblejs/core”: “^3.0.0-next.78”, “@marblejs/middleware-body”: “^3.0.0-next.78”, “@marblejs/middleware-cors”: “^3.0.0-next.78”, “@marblejs/middleware-io”: “^3.0.0-next.78”, “@marblejs/middleware-logger”: “^3.0.0-next.78”, “@marblejs/middleware-multipart”: “^3.0.0-next.78”, “rxjs”: “^6.5.3”

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
JozefFlakuscommented, Jan 24, 2020

@tstelzer I’ve spotted one issue in your code. There is a big difference between:

    // ...
    r.useEffect(pipe(
       // ...
    )),

and

    // ...
    r.useEffect(req$ => req$.pipe(
       // ...
    )),

Take a look at the RxJS pipe source code: https://github.com/ReactiveX/rxjs/blob/master/src/internal/util/pipe.ts

Marble.js effect is a function with two parameters - not only one. Which results with passing both req$ and ctx to the pipe.

After the fix the a$ count() returns 0 but I need to futher investigate why.

EDIT: I found the bug that was introduced with rc.2 (rc.1 forks fine).

0reactions
JozefFlakuscommented, Jan 24, 2020

v3.0.0-rc.3 released

Read more comments on GitHub >

github_iconTop Results From Across the Web

Amazon S3 multipart upload limits - AWS Documentation
Amazon S3 multipart upload limits ; Maximum number of parts per upload, 10,000 ; Part numbers, 1 to 10,000 (inclusive) ; Part size,...
Read more >
Multipart form data file upload runs into size limit issue #338
I have this file upload api (multipart/form-data) and I run into a http 413 when I upload a 3.2 mb json file.
Read more >
What is the right way to POST multipart/form-data using curl?
The following syntax fixes it for you: curl -v -F key1=value1 -F upload=@localfilename URL.
Read more >
Multipart Upload for Large Files using Pre-Signed URLs - AWS
Using multipart uploads, AWS S3 allows users to upload files partitioned into 10,000 parts. The size of each part may vary from 5MB...
Read more >
Multipart Forms — Falcon 3.1.1 documentation
The size limit guards against reading unexpectedly large amount of data into memory by referencing data and text properties that build upon this...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found