File tree Expand file tree Collapse file tree 1 file changed +0
-25
lines changed
Expand file tree Collapse file tree 1 file changed +0
-25
lines changed Original file line number Diff line number Diff line change 2626
2727const carriage = '\r\n'
2828const dashes = '-' . repeat ( 2 )
29- const carriageLength = Buffer . byteLength ( carriage )
3029
3130const NAME = Symbol . toStringTag
3231
@@ -101,28 +100,4 @@ module.exports.formDataIterator = function * (form, boundary) {
101100 yield getFooter ( boundary )
102101}
103102
104- /**
105- * @param {FormData } form
106- * @param {string } boundary
107- */
108- module . exports . getFormDataLength = function ( form , boundary ) {
109- let length = 0
110-
111- for ( const [ name , value ] of form ) {
112- length += Buffer . byteLength ( getHeader ( boundary , name , value ) )
113-
114- if ( isBlob ( value ) ) {
115- length += value . size
116- } else {
117- length += Buffer . byteLength ( String ( value ) )
118- }
119-
120- length += carriageLength
121- }
122-
123- length += Buffer . byteLength ( getFooter ( boundary ) )
124-
125- return length
126- }
127-
128103module . exports . isBlob = isBlob
You can’t perform that action at this time.
0 commit comments