Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript html5 select image and manipulate

  • This topic is empty.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #188061
    Anonymous
    Inactive

    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.

    #188064
    Paulie_D
    Member

    Where would the image be stored then if there is no server side…?

    #188065
    Anonymous
    Inactive

    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.

    #188067
    Paulie_D
    Member

    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?

Viewing 4 posts - 1 through 4 (of 4 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.