0

I have a website which I desire to browse the https://somewebsite/public/images/ folder, which is possible through the browser. I want to map the contents of it and do a bunch of stuff. But I am having a hard time getting the contents of said folder using nodejs. Is there a way to get the contents of a remote directory? I have no access to the code of this website whatsoever. To give you more information about this. I don't have access anymore to this website, the credentials to access it were lost, and I have to retrieve all the files from it.

0

1 Answer 1

1

You really should provide more information, like if you're using express and what you've tried so far.

If you are using Express, the easiest thing to do would be to install the serve-index module and configure it.

$ npm install --save serve-index

Then in your express startup file:

var express    = require('express')
var serveIndex = require('serve-index')

var app = express()

// Serve URLs like /ftp/thing as public/ftp/thing
app.use('/images', serveIndex('public/images', {'icons': true}))
app.listen()
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.