Just as #540694: Compatibility with Pathologic module we would like to somehow alter the slash prefix that IMCE inserts. The module we are maintaining, Linkit, currently enables users to browse files with IMCE. However, IMCE returns a slash "/" prefix which we would like to alter. (If Drupal is installed in a subdir the prefix is "/subdir/")
In our case we would just like to remove the slash, but there could be other situations where it would be better to have an absolute URI prefix or something completely different. The IMCE "API" has an "url" parameter which tells IMCE to insert the url to a certain element. Could there possibly be an optional prefix parameter as well? If it it's not specified, then let IMCE decide (i.e. normal behavior). In that way it wouldn't interfere with any current functionality.
Comments
Comment #1
ufku CreditAttribution: ufku commentedYou may try sendto integration where you manually set your field content with the provided file object. You will also have access to imce variables and methods.
Quoting from readme.txt
Here is how to derive file uri as its stored in db.
Note that it's more reliable to decode the relative path at server side using rawurldecode() instead of js imce.decode().
Moreover, url('imce') serves files using the default scheme. If you want IMCE list files of a specific scheme you should use url('imce/SCHEME').
Comment #2
anon+1
Comment #3
betamos CreditAttribution: betamos commentedThank you very much, I have tried this now and it works perfect. I'm happy with this solution, so I'm changing status to support request for now. If anyone still feels that the behavior of IMCE should be different, please reopen this ticket.
Thanks again for the sophisticated reply.