file upload AJAX

arie

Member
Hello,

I discovered that using placeholder (table___element) into Upload Directory for regular uploads is working great but when enabling ajax uploads, that doesn't work ({rowid} as well).

Bug?
 
Unfrotunately element placeholders won't work with AJAX upload folders. This is because the uploading of AJAX is done "out of band", i.e. during form filling, though a 3rd party plugin ('plupload') rather than at submisison time through the usual Fabrik submission process, and the additional element data simply isn't available to use.

This is one of those things which could be fixed, but would require re-writing much of the AJAX upload code, by defering when we do the move of the file to the destination. Which raises other problems, which is why we decided to do it the way we did to start of with ... a trade off between problems / features.

Oh, some placeholders will work, like {$my->id} or whatever ... basically anything that isn't element data.

And I suspect it would be possible to roll your own solution, I think, by getting creative with some of the JS events we raise in the upload process (or hooking in to plupload's event system yourself), running some AJAX to send the element data to the server, setting session variables, which I seem to recall we have a generic placeholder mechanism for (can't recall of the top of my head, I think it {_SESSION->foo}, yada yada. But this is something you'd have to figure out yourself, we couldn't do it for you.

Of course, if someone wanted to fund re-writing of the upload element to do that defering of the file move, we could probably do it. But it's not soething which is going to "just happen" any time soon. And my best guess at time would be "a couple of days" minimum.

-- hugh
 
We are in need of some funding.
More details.

Thank you.

Members online

No members online now.
Back
Top