freesoftwarefactory / parse-multipart

A javascript/nodejs multipart/form-data parser which operates on raw data.
MIT License
48 stars 79 forks source link

formData fields support. #7

Open rcfrias opened 6 years ago

rcfrias commented 6 years ago

This will enable the Parser to parse field parts included in formData. Ej. (parsed data): parts: { name: 'name', data: 'test product' } { name: 'code', data: 'product code' } { name: 'category', data: 'product category' } { filename: 'productImage.jpg', type: 'image/jpeg', data: <Buffer ef bf bd ef bf bd ef bf bd ef bf bd 00 10 4a 46 49 46 00 01 01 00 00 01 00 01 00 00 ef bf bd ef bf bd 00 43 00 03 02 02 02 02 02 03 02 02 02 03 03 03 ... > }

rcfrias commented 6 years ago

This solves scenarios like

Tests for collections of multiple Image+data to follow...
i.e. importing products (batch processing style)

rcfrias commented 6 years ago

Still missing to test: 1) Batch parsing 2) Validations (empty fields &| files)

jeprojects commented 6 years ago

@rcfrias Tested this, now form data is working correctly. Thanks!

christiansalazar commented 6 years ago

i need to find some time for this project. 2 pending merge requests..very sorry, 3 jobs is hard.

fhackenb commented 5 years ago

Thanks for this PR, works well for me too! Hope it gets merged soon

fhackenb commented 5 years ago

I was getting an error for empty input fields - I was able to fix it by adding a try catch block around allParts.push(process(p));

StevenPMX commented 5 years ago

Thanks, this helped me a lot!

adimoraret commented 5 years ago

Great!!! This PR worked for me.

AyaMagdyMohamed commented 4 years ago

Why this pull request not merged?

keroloswilliam commented 4 years ago

is there an ETA on the merging this PR

theresazobel commented 4 years ago

It's been over 2 years, please merge this soon! This helps a lot!

wips commented 4 years ago

Faced the same issue and found that there's a forked repo where the issue is fixed - https://www.npmjs.com/package/parse-multipart-data. Just in case someone else needs it.

AndrewJayDev commented 2 years ago

MERGE THIS NOW.

Please. It has solved my issues.

christiansalazar commented 2 years ago

im very sorry, i cant. because some critical components in my side is actively using the master branch as-is. so, because i cant perform testing to verify the impact in my products (and others, from different people) then: i cant.

AndrewJayDev commented 2 years ago

Ah okay. Gotcha. :)

On Thu, Oct 7, 2021, 11:43 Christian @.***> wrote:

im very sorry, i cant. because some critical components in my side is actively using the master branch as-is. so, because i cant perform testing to verify the impact in my products (and others, from different people) then: i cant.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/freesoftwarefactory/parse-multipart/pull/7#issuecomment-937862128, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMGYHUYI3MYF3Y4WGZ6Z65TUFWW2JANCNFSM4DXKYEBA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.