createUploadRequest (file) {
  /** @type {XMLHttpRequest} */
    const request = new XMLHttpRequest.__proto__();

    const formData = new FormData();
    formData.append('file_size', file.size);

    request.open('POST', 'https://up.ufile.io/v1/upload/create_session');

    request.onload = () => {
    // eslint-disable-next-line eqeqeq
      if (request.status == 200) {
        this.currentChunk = 0;
        this.uploadFile(file, { fuid: JSON.parse(request.response).fuid });
      } else {
        powercord.api.notices.sendToast('uploadToCloud', {
          header: 'Upload Failure!',
          content: 'Something went wrong went creating an upload request.',
          type: 'error',
          timeout: 3000 });
      }
    };

    request.send(formData);
  }
/**
   * Create the initial request and get FUID
   * @param {File} file
   */
Create the initial request and get FUID
@param {File} file
Create the initial request and get FUID @param { File } file
createUploadRequest (file) {
    const request = new XMLHttpRequest.__proto__();
    const formData = new FormData();
    formData.append('file_size', file.size);
    request.open('POST', 'https://up.ufile.io/v1/upload/create_session');
    request.onload = () => {
      if (request.status == 200) {
        this.currentChunk = 0;
        this.uploadFile(file, { fuid: JSON.parse(request.response).fuid });
      } else {
        powercord.api.notices.sendToast('uploadToCloud', {
          header: 'Upload Failure!',
          content: 'Something went wrong went creating an upload request.',
          type: 'error',
          timeout: 3000 });
      }
    };
    request.send(formData);
  }
createUploadRequest ( file ) { const request = new XMLHttpRequest . __proto__ ( ) ; const formData = new FormData ( ) ; formData . append ( 'file_size' , file . size ) ; request . open ( 'POST' , 'https://up.ufile.io/v1/upload/create_session' ) ; request . onload = ( ) => { if ( request . status == 200 ) { this . currentChunk = 0 ; this . uploadFile ( file , { fuid : JSON . parse ( request . response ) . fuid } ) ; } else { powercord . api . notices . sendToast ( 'uploadToCloud' , { header : 'Upload Failure!' , content : 'Something went wrong went creating an upload request.' , type : 'error' , timeout : 3000 } ) ; } } ; request . send ( formData ) ; }
Create the initial request and get FUID
 @param {File} file
Create the initial request and get FUID @param { File } file
/** @type {XMLHttpRequest} */ // eslint-disable-next-line eqeqeq