dnd2share custom scripts

Asked by Sebastian Mitterle

the documentation on the dnd2share is very scarce. if i wanted to develop an upload script for it, which would be the restrictions?

Question information

Language:
English Edit question
Status:
Answered
For:
Cairo-Dock Plug-ins Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Fabounet (fabounet03) said :
#1

Hi,
The script is called with 2 parameters :
- the path of the file
- and the limit bandwith
It should output the resulting URL if the upload is successful.
Here is an exemple to upload on dl.free.fr :

TMP=$(tempfile)
curl -q -v -T "$1" --limit-rate $2 -u <email address hidden>:toto ftp://dl.free.fr/ 2> "$TMP"

if test $? -eq 0; then
        URL=$(grep -i -F "Il est disponible via" $TMP | grep -o "http:[^ ]*")
        if test "x$URL" != "x" ; then
                echo $URL
        fi
fi
#rm -f "$TMP"
exit 0

Can you help with this problem?

Provide an answer of your own, or ask Sebastian Mitterle for more information if necessary.

To post a message you must log in.