Jump to content

InputfieldImage ajax upload on file select


renobird
 Share

Recommended Posts

Hello all,

Before I go building something, I thought I'd ask here for existing solutions or opinions.

I have a large group of users who are stuck using IE9 (and will be for some time), so the drag/drop image upload doesn't work for them.

Not a problem, they don't see the "drag and drop files here" label.

Many of these users have requested that the "browse" button auto upload images once they are selected. The reason for this is that in order to work with the images (sort/add captions) etc, they have to go to the top/bottom of the page to hit save and then scroll back to the images field to keep working.

My questions:

Have any of you done this already — If so, do you mind sharing?

Are there pitfalls to this idea that I'm just too dense to see at the moment?

Link to comment
Share on other sites

ufff, just thinking... would a onchange on the file input with triggering the save button help as workaround? 

Maybe bombined with a add hash to form action url to jump to image field? Kinda hacky but should work fine.

$('#ProcessPageEdit #Inputfield_images').on("change", function(e){
    $("#ProcessPageEdit").attr("action", $("#ProcessPageEdit").attr("action") + "#Inputfield_images");
    $("#submit_save").trigger("click");
});
  • Like 1
Link to comment
Share on other sites

Thanks Soma,

That could work. I was thinking there might be a way to trigger the ajax upload that happens on the drag/drop — just on input change instead.

I haven't spend much time looking it yet, thought I'd post here for thoughts first.

If that turns out to be too complicated, your method above will do the trick for sure.

:)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...