Data Analyzer

  • Tila: Closed
  • Palkinto: $20
  • Vastaanotetut työt: 6
  • Voittaja: sundarsankaran

Kilpailun tehtävänanto

Map two files on the basis of one parameter (available in both the files) and look for corresponding other fields and display it on a webpage.
Need to fetch the first file from the local machine while the second file is present on the network location.
The problem I am facing right now is that there is zipped folder in the network location. I want to unzip the zipped folder and extract the particular file available inside that.
I am able to access the server location but I am struggling in unzipping the folder.
I have a specific path, that I want to pass (for eg: :C:\Users\Public\abc.zip). I have already stored this path in a variable (not using HTML for this)
Refer link:
https://gildas-lormeau.github.io/zip.js/demos/demo2.html
this allows the user to manually select the zip folder and displays all the file contents. While I dont want to select the zip folder manually, I have the path. I somehow want to pass the path the path, extract the files. Once the files are extracted, I want to read data from a particular xml file and store it in a string variable

Suositellut taidot

Työnantajan palaute

“Great working with Sundar. Really supportive, helpful. Helps until finishes the activity. Knows how to find the solution even for a complex task.”

Profiilikuva anjalirathore910, United States.

Kilpailun parhaat työt

Näytä lisää töitä

Julkinen selvennystaulu

  • korneldevdesign
    korneldevdesign
    • 5 vuotta sitten

    What you want to achieve cannot be done in modern browsers, because they implement certain security restrictions.

    • 5 vuotta sitten
    1. korneldevdesign
      korneldevdesign
      • 5 vuotta sitten

      I see some possible solutions however. For example you can serve up your file locally with a Node.js server and then just fetch as a "remote" resource.
      Or you could use just use Node.js and and install another library to work with zip archives.

      // "zip" is a package on npmjs.org to work with zip archives
      const zip = require('zip') // npm install zip
      const fs = require('fs')

      const pathToZipFile = './local.zip';
      const localZipFile = fs.readFileSync(pathToZipFile)
      const reader = zip.Reader(localZipFile)

      const obj = reader.toObject('utf8')
      console.log(obj)

      // if there is only one file in the zip archive
      const localXMLContents = Object.values(obj)[0]

      console.log(localXMLContents)

      • 5 vuotta sitten
  • azharulislam07
    azharulislam07
    • 5 vuotta sitten

    Sir, thank you very much for me. I will give you your profile

    • 5 vuotta sitten
  • sundarsankaran
    sundarsankaran
    • 5 vuotta sitten

    Are you using JavaScript ? to extract zip

    • 5 vuotta sitten
    1. anjalirathore910
      Kilpailun järjestäjä
      • 5 vuotta sitten

      Yes, I am using javascript.

      • 5 vuotta sitten
    2. anjalirathore910
      Kilpailun järjestäjä
      • 5 vuotta sitten

      I found the sample code in https://gildas-lormeau.github.io/zip.js/ for reading zip files. I am trying to modify that code for my purpose

      • 5 vuotta sitten

Näytä lisää kommentteja

Kuinka päästä alkuun kilpailuiden kanssa

  • Ilmoita kilpailusi

    Ilmoita kilpailusi Nopeaa ja helppoa

  • Saat valtavasti töitä

    Vastaanota tonnikaupalla osallistumisia Ympäri maailmaa

  • Myönnä palkinto parhaalle työlle

    Myönnä palkinto parhaalle työlle Lataa tiedostot - Helppoa!

Ilmoita kilpailu nyt tai liity tänään!