Skip to content

How to show files already stored on server #1909

Answered by enyo
enyo asked this question in Q&A
Discussion options

You must be logged in to vote

In short: use myDropzone.displayExistingFile().

Dropzone.options.myDropzone = {
  init: function() {
    let myDropzone = this;

    // If you only have access to the original image sizes on your server,
    // and want to resize them in the browser:
    let mockFile = { name: "Filename 2", size: 12345 };
    myDropzone.displayExistingFile(mockFile, "https://i.picsum.photos/id/959/600/600.jpg");

    // If the thumbnail is already in the right size on your server:
    let mockFile = { name: "Filename", size: 12345 };
    let callback = null; // Optional callback when it's done
    let crossOrigin = null; // Added to the `img` tag for crossOrigin handling
    let resizeThumbnail = false; /…

Replies: 3 comments 12 replies

Comment options

enyo
Feb 19, 2021
Maintainer Author

You must be logged in to vote
8 replies
@JamieGarcia123
Comment options

@enyo
Comment options

enyo Oct 28, 2021
Maintainer Author

@JamieGarcia123
Comment options

@shiroze
Comment options

@iwasherefirst2
Comment options

Answer selected by enyo
Comment options

You must be logged in to vote
1 reply
@enyo
Comment options

enyo Oct 27, 2021
Maintainer Author

Comment options

You must be logged in to vote
3 replies
@timo002
Comment options

@padi-dev-lucvt
Comment options

@sathyapillay
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
9 participants