Start a new topic
Answered

parsing value from URL to event

Hi 


when log in a user with url ?u=user&p=password... is it possible to add values to the url string and pass it to an event? ie /?u=user&p=password&cust=custvalue...




Best Answer

There is a command called "customEvent".  It can take parameters and send them to a custom event watcher you have configured on the user.


However, to call it, you need to URL encode your "command" to make it be the "path".


Example:


http://127.0.0.1:8080/?u=test2&p=test2&path=/command%3DcustomEvent%26paths%3D%2F%26something%3Dother


Thanks,

Ben


Answer

There is a command called "customEvent".  It can take parameters and send them to a custom event watcher you have configured on the user.


However, to call it, you need to URL encode your "command" to make it be the "path".


Example:


http://127.0.0.1:8080/?u=test2&p=test2&path=/command%3DcustomEvent%26paths%3D%2F%26something%3Dother


Thanks,

Ben

I must be stupid... crush returns: The selected resource was not found.

And as a side note...this sort of functionality isn't safe, and won't work in new versions of CrushFTP now.  Trying to come up with another solution that is safer...

In your prefs, WebInterface, options, toggle the direct linking checkbox.


Thanks,

Ben

Login to post a comment