Dropzone.js preview addedimage elsewhere on the page - javascript

Does anyone know how to access image file added to dropzone before it is being uploaded, so it can be displayed in another div in the page?
Thanks

Related

Image gallery that is opened via a preview with fancybox

I wanted to create an image gallery that opens via a preview and links to another page where the images are located.
like this one https://fancyapps.com/playground/XU. but the link must call up and open the image gallery located on another page.
I tried using ajax but I can't. Can anyone help me?
Your question is not clear:
"links to another page where the images are located"
"open the image gallery located on another page".
If you're thinking that Fancybox will load the content of another page to find the gallery links and then use those to display the image gallery, sorry, but that's not supported.
But you can always create your own click handler that determined the content source and then use the Fancybox.show() method to programmatically start Fancybox.

About Sharepoint image slider

I want onclick function where I want to display the sharepoint folder content. I write the code and getting all the foldername in link bt when i click on that link its showing all images of folders. I want only that folder images on which i click please help.

Upload Image by URL only

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?

preview image after upload

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

JS detect upload from a new window

I have a windows, which in there is a upload button. When user click this button, it will popup a page for user to upload the desired file. But i dont know how can the main page detect if the user uploaded and add a field to the main form?
I've been seeing this somewhere but i dont remember so i can't go back to check out the source JS..
If anyone know, please give me an advice.
Thanks in advance :)
PS: im working on Jquery
A variation of what moxn said,
The popped up window accepts the file upload, it sends the file to the server and then returns another page indicating whether the file was uploaded successfully.
I don't know what server side language you are using but, on that return page you should have something like:
if (file was uploaded successfully){
print "<html>
<body onload='window.opener.trigger()'>
file uploaded successfully, please close this window
</body>
</html>";
}else{
print "<html>
<body>
could not upload file due to [reason], please re-upload the file
</body>
</html>";
}
Notice the body onload='' on the first part of the conditional...
Hope that helps
From your popup window you can access the parent window through window.opener.
$("#upload-button").click(function(evt){
window.opener.trigger();
});
would call a function trigger() in the parent window each time the upload button has been clicked.

Categories

Resources