sconsult / croppic

croppic
914 stars 228 forks source link

Preload option keeps reloading the image #214

Open Esger opened 8 years ago

Esger commented 8 years ago

When using the preload option (existing image on server) it is not possible to select a new image. It keeps reloading the existing image, even when you click the reset (red X).

sconsult commented 8 years ago

Hi @Esger

Thank you for your feedback. The preload function was intended to have exactly this behavior. As you noticed there is no upload functionality by default. It is intended for not giving the user an upload functionallity, rather the developer to define what image should be handled by croppic.

You could work around that immediately by re initializing crop pic with a new picture, if you have the need to crop picture after picture.

What would your expectation be ? Would love to hear feedback so we can continuously improve the tool.

Cheers

Mat

Esger commented 8 years ago

Thanks for your reply Mat. I want to use croppic to let users crop a profile photo. The first time a dummy image is shown (in the croppic box). I want to enable the user to clear the dummy image and upload their own subsequently. I did try reinitializing croppic with reset(), but then it gives an error when I select an image: unexpected end of input.

vididesign commented 8 years ago

same problem. using this script to upload images for site posts. and i use loadPicture to show uploaded photo in post edit form and there is no way to upload new image. any suggestions how to remove preloaded picture from croppic? may be with additional button? is it possible to unassign loadPicture param and then reset croppic? or may be better find another way to show uploaded image without loadPicture param? thanks.

marcosschroh commented 8 years ago

Hi everybody! I had the same problem. I forked the project and created a pull request with this functionality. This is my repo: https://github.com/marcosschroh/croppic If someone is using Python, I've created a practical example of how use croppic with Python + Django: https://github.com/marcosschroh/croppic-django

@sconsult I am using it in production and is working well. If you want we can try to merge the new feature with master.

marvoh commented 8 years ago

Thanks @marcosschroh, your solution works like a charm

marcosschroh commented 7 years ago

@marvoh you're welcome!!

marcosschroh commented 7 years ago

Hi,

@carlosfvieira Did you try with my fork?

2017-01-29 0:07 GMT+01:00 Carlos Vieira notifications@github.com:

Hi @marcosschroh https://github.com/marcosschroh , i tried your solution but the problem remains... i've created issue #255 https://github.com/sconsult/croppic/issues/255 , which is basically the same issue than this i think...

No matter we click X button, nothing happens, ie user can't upload new file...

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/sconsult/croppic/issues/214#issuecomment-275881243, or mute the thread https://github.com/notifications/unsubscribe-auth/ACsqKnn0G76wOaNwu6B_tRpqEtgti5Bwks5rW8odgaJpZM4H4zBg .

-- Saludos

Marcos.

carlosfvieira commented 7 years ago

Hi marcosschroh https://github.com/marcosschroh, yes it works. It wasn't working bexause of caching issues.

Thank you :)

Em 29/01/2017 02:27, "Marcos Schroh" notifications@github.com escreveu:

Hi,

@carlosfvieira Did you try with my fork?

2017-01-29 0:07 GMT+01:00 Carlos Vieira notifications@github.com:

Hi @marcosschroh https://github.com/marcosschroh , i tried your solution but the problem remains... i've created issue #255 https://github.com/sconsult/croppic/issues/255 , which is basically the same issue than this i think...

No matter we click X button, nothing happens, ie user can't upload new file...

— You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub https://github.com/sconsult/croppic/issues/214#issuecomment-275881243, or mute the thread https://github.com/notifications/unsubscribe-auth/ACsqKnn0G76wOaNwu6B_ tRpqEtgti5Bwks5rW8odgaJpZM4H4zBg .

-- Saludos

Marcos.

— You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub https://github.com/sconsult/croppic/issues/214#issuecomment-275889287, or mute the thread https://github.com/notifications/unsubscribe-auth/AIa-kj5GCKKLrfHZChFkIsQ74kz4_Y7fks5rW_j1gaJpZM4H4zBg .