New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
added ajaxy image uploading #1739
Conversation
@@ -5,6 +6,24 @@ | |||
:object => @image, | |||
:include_object_name => false %> | |||
|
|||
<% unless @image.errors.any? %> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<% if @image.errors.empty? %>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will modify
@ugisozols should it be closed right away and the flash message should then be showed where it was before? |
@jipiboily yes. |
I'm guessing the last request added somewhat of a challenge? |
@parndt things in my personal life kept me away from coding...I will do that really soon. I might have to play with the flash header to append all file names to the message... |
@jipiboily I believe so yes! :-) |
I finally removed the flash, it felt too hacky. It will automatically close the dialog after a successful upload and will show that: http://cl.ly/1f0h2W2g1V450w3M3L0T Is that what you imagined? |
@jipiboily yes. |
@jipiboily What does it show when you upload multiple while inserting? |
@robyurkowski not sure to understand what you mean. You mean during the process? You want me to shoot a video of the process? :) |
Like if I'm uploading while inserting into a page. What is the behaviour then? |
Hum, it is closing the dialog now...which is unexpected in this specific use case, and unwanted. |
Two choices guys from here. Or we don't close the dialog automatically in neither of the situations, or we don't close it when inserting an image into a page. What would you prefer? |
@jipiboily can you make it behave the same as it is now? Thanks. |
Sure, I'll do! |
Hi guys! I made it working mostly like it is now as far as I know. If I missed something (I didn't use Refinery that much), do not hesitate to tell me! Cheers |
Hey @jipiboily, Just tried out this and it works great! Can you do 2 more things?
Thanks! |
I would love to get this merged soon as it's a nice feature. @ugisozols @robyurkowski maybe we could implement the last couple of items? |
I did the changes I wanted and pushed to a new branch because I couldn't open a PR against @jipiboily repo. Please review. |
I just got back from 3 weeks of vacations. Thanks for putting the last touch @ugisozols! |
Is someone currently working on this? |
Nope. |
Here is the handling of image uploading with an ajaxy touch. It will upload files one by one instead of a single batch. This will prevent timeouts on say, Heroku.
It was asked by @robyurkowski here https://github.com/resolve/refinerycms/issues/1329#issuecomment-4862916. It was previously handled by https://github.com/jipiboily/refinerycms-imajax.
There is only one problem I see is the handling of I18n on the client side. I used the same method as you use in core, but it proved to be inefficient while I tested that. All the output will be in english even if there is a french translation. How would you want to support that?
Hope it's up to what you expected, if not, do not hesitate to comment or make suggestions. Friendly bashing accepted! ;)