But when i go to ipfs.io/ipfs/CID, it want me to go through the whole directory to get to the uploaded file: the code is:-
const IPFS = require("ipfs");
async function main() {
const node = await IPFS.create();
const version = await node.version();
console.log("Version:", version.version);
const fileAdded = await node.add({
path: "FILE_PATH",
content: "DESCRIPTION",
});
console.log("Added file:", fileAdded.path, fileAdded.cid);
}
main();
this code gives me the CID of my uploaded file, so why does it giving me whole directory when i want to look up my file on browser,
for example if file path is :: home/A/B/1.png
then when i go to ipfs.io/ipfs/CID,
it takes me to ipfs, and there is a folder home,
when i go in home, there is a folder A then B and then 1.png and after clicking on 1.png, I can see my file. But i want to look up to my file directly.