I have a image upload page. When user upload an image they can preview it and add text into it before it save into database.
my question is
how can i preview the image in 2nd (preview page)
1.I have try file reader, but its not work for most of old browser. so im seeking another way
2.do i need to create another folder and save temp image into it?
(than save it into image folder after user have finished the editing)
something like google+ or facebook, how did they achieve this?
You could just receive the uploaded file, save it into some temporary folder and then show back to client. If they save form then move into the final folder. Otherwise every 24 hrs (or whatever you feel is necessary) delete the image or maybe if you can track pages then delete old images when they change pages
Related
I'm trying to find some info online on how to update my user's profile picture on the profile page in the same way that social media applications do it, i.e. by clicking on the profile picture itself and getting asked for the file upload straight away. However, all I'm finding online is options to create a form to do that job, but then it's going to be an upload button that does the job, which is not the same.
How do I get the image to be clickable, opening a file upload after I click it that would then update my model ImageField?
I have a set of web pages and i want to set them with a background image but it must be something the client chooses through an
so all the pages have the background image the user chooses
also i'm loading the page using a node.js and express backend.
I already tried uploading images but it doesn't persist it must stay that way even after they close the application
I expect that when you open the web page you see the background you choosed
EDIT: ok so i'm thinking about loading it from a image folder and then storing the name of the image in the database?
any ideas or suggestions?
You can use multer to upload the images to your server and then save the images with reference to the user [user id] that uploaded the image. So next time when that particular user opens the web page, you will have a reference to their saved images. I hope this helps.
I am working on a project using Phonegap, i am creating profile page but the issue is that when user uploads new profile picture, picture successfully uploaded to the server, but it does not show updated picture in the profile, instead it shows the previous image, i know it is using the image from cache that was already there. So how can i avoid using the image from cache, i want new image from the server.
i used following code in ajax call but it is not working.
cache:false,
I need to upload an external image when a user pastes the url into an input bar. I am using dropzone, jquery, and backbone. So I'm thinking dropzone to upload the image, but I don't exactly know how it would work without the user literally dropping the image onto the page from the page they get it from. Any thoughts?
I am developing a mobile application that has this scenario: A user goes to one screen where they supply indexing meta data for an image. From this first screen they can go to a second screen where they select and upload the actual image to go with the meta data. Once selected, they go back to the first screen where they can then upload both the image and the meta data to a separate web service. Now, once the image has been selected and the user is back on the first screen, they may want to look at or change the image (that they previously selected) before actually submitting it to the web service. So I need to provide a way for the user to go back to the second screen and see the image they previously uploaded (without having to select it again). Clear so far?
In my ASP.Net MVC mobile application code I am caching the uploaded image to the server in a temporary file path on the server. Now I want to take that saved file and load it into a javascript image object so it can be displayed to the user when they go back to the second screen. How can this be done?
When you upload it to the server, the server can respond with a URL that can be used to retrieve the uploaded image. Capture that response and use it to set the src attribute of a new client-side Image object.