How To get User's Storage File By JavaScript/Php | SoloLearn: Learn to code for FREE!

+23

How To get User's Storage File By JavaScript/Php

I want to create a project in which user enter his file's path in input field like file:///sdcard/images/cat.png And then our website show cat.png from his device. Its it possible?? please Help if you can because i want to learn many things about it🥺.

17 Answers

New Answer

+15

乂۝丹ⓨㄩک廾۝乂〖թг๏〗 i know about this but i want something different. <input type="text" name="url"> User enter file path where his file is stored then our website display his file name and as well as image

+16

It's illegal Pikachu(you must heard my name)

+15

Nilesh 👑Daniel👑 ꧁Upmanyu✨꧂ Prachi The Pari💕 ✨ashwini Kumar💞... Priyanshi💞 Aakaanksha 💕 Anshika Amardeep kesharwani Árádнnâ♡♡ Please Give Answer If You know

+11

Pikachu(you must heard my name) It is *NOT* illegal.

+10

Mady_is_here SHIBGAT Prashanth Kumar Sairam

+10

Since JavaScript runs on browser you can not unknowingly access users files. The only way to access user files is to use input type='file'. If you're talking about Node.js on server then it's a different story.

+9

<input type="file"/> will do this for you Note : Sololearn dosent supports this . This can be only done on browser like firefox, chrome, Mozilla etc

+9

Prachi The Pari💕 🔫 Rick Grimes 乂۝丹ⓨㄩک廾۝乂〖թг๏〗 Its illegal but why. I am taking users data with his permission 😟. I want this not on sololearn i want to add this on my website because i know sololearn didn't support such features

+9

🔫 Rick Grimes but can i get it by any method?😟

+8

I think Prachi The Pari💕 is right because on sololearn we can't interact with local storage infact it is possible on browsers

+6

I used to learn c++ and c# only but if you need answer to your question, you will probably find it on w3schools.com

+6

You want to input a file Path And then website should show that file right??

+6

乂۝丹ⓨㄩک廾۝乂〖թг๏〗 I think you are right bro😊

+6

Pikachu(you must heard my name) Thanx for sharing 😅😅😀

+3

It is possible using the HTML5 File API. https://developer.mozilla.org/en-US/docs/Web/API/File/Using_files_from_web_applications https://web.dev/read-files/

+2

<input type="file" id="myfile" name="myfile"> With this input you will be able to select a file for upload from ur user . You have to do some backends to store it.easiest way is PHP and SQL.

0

Help