- This topic is empty.
Viewing 4 posts - 1 through 4 (of 4 total)
Viewing 4 posts - 1 through 4 (of 4 total)
- The forum ‘JavaScript’ is closed to new topics and replies.
The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Home › Forums › JavaScript › html5 select image and manipulate
I’m creating an app in which I want the user to upload an image with HTML5 <input type=”file”/>
I know the browsers restrict getting the path of the image because of security, so i can’t copy the image path and put it where ever I want.
Basically I want the user to submit an image, and I want to be able to manipulate the image by setting it as background-image of divs and putting the image in other places. hopefully by changing its source. This is not a server-side app so PHP or any server-side languages aren’t an option.
EXAMPLE: If the user clicks a button, the image the user submited can be set as the background-image: url(‘image-path’) of other divs and be applied to to other image tags.
Where would the image be stored then if there is no server side…?
It wouldn’t be stored anywhere. The image can be displayed in the browser with javascript, its just that it doesnt use the image path.
It has to be stored somewhere…it’s file to be referenced in your code somehow…it’ll need some sort of path otherwise how would it be displayed?