HEX
Server: nginx/1.28.1
System: Linux 10-41-63-61 6.8.0-31-generic #31-Ubuntu SMP PREEMPT_DYNAMIC Sat Apr 20 00:40:06 UTC 2024 x86_64
User: www (1001)
PHP: 7.4.33
Disabled: passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv
Upload Files
File: /www/wwwroot/oura.mlazu.com/node_modules/.pnpm/node_modules/formdata-polyfill/formdata-to-blob.js
/*! formdata-polyfill. MIT License. Jimmy Wärting <https://jimmy.warting.se/opensource> */

const escape = (str, filename) =>
  (filename ? str : str.replace(/\r?\n|\r/g, '\r\n'))
  .replace(/\n/g, '%0A')
  .replace(/\r/g, '%0D')
  .replace(/"/g, '%22')

/**
 * pure function to convert any formData instance to a Blob
 * instances synchronous without reading all of the files
 *
 * @param {FormData|*} formData an instance of a formData Class
 * @param {Blob|*} [BlobClass=Blob] the Blob class to use when constructing it
 */
export function formDataToBlob (formData, BlobClass = Blob) {
  const boundary = ('----formdata-polyfill-' + Math.random())
  const chunks = []
  const prefix = `--${boundary}\r\nContent-Disposition: form-data; name="`

  for (let [name, value] of formData) {
    if (typeof value === 'string') {
      chunks.push(prefix + escape(name) + `"\r\n\r\n${value.replace(/\r(?!\n)|(?<!\r)\n/g, '\r\n')}\r\n`)
    } else {
      chunks.push(
        prefix + escape(name) + `"; filename="${escape(value.name, 1)}"\r\n` +
        `Content-Type: ${value.type || 'application/octet-stream'}\r\n\r\n`,
        value,
        '\r\n'
      )
    }
  }

  chunks.push(`--${boundary}--`)

  return new BlobClass(chunks, {
    type: 'multipart/form-data; boundary=' + boundary
  })
}