-   Programming (
-   -   CURL issues in bash (

iniuria 03-07-2010 07:49 PM

CURL issues in bash
Hi, i'm trying to write a bash script to upload an image to, but i can't get i working properly.

Everytime i try, the html returns me a error saying "Upload is disabled during short maintenance work (ETA 10 minutes). Brb!", while from the browser everything works fine.

This is my current command line:

curl -L -b cookie-pix.txt -c newcookie.txt -A "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)"  -F 0=@/home/admin/Desktop/karm.jpg -F content_type=0 -F press=Upload
And this is the html of the form:

<form name="upload" method="post" onsubmit="return image(upload);" enctype="multipart/form-data" action="">

<h3>Select pictures:&nbsp;</h3><br />
<div style="padding-bottom:5px;">
<input type="file" name="0" style="margin-top:2px;"/><br />
<input type="file" name="1" style="margin-top:2px;"/>

<div style="padding-bottom:5px;">
<input type="file" name="2" style="margin-top:2px;"/><br />
<input type="file" name="3" style="margin-top:2px;"/>

<div id="viac"></div>
<div style="margin-top:4px;"><a onclick="coverupload();">More</a><br /></div>

<div style="padding-top:5px;">Content type:
 <input type="radio" name="content_type" value="1"/> Adult (XXX)
 <input type="radio" name="content_type" value="0"/> Family safe

<div style="padding-top:5px;">Connect pictures: <input type="checkbox" name="split"/></div>

<div style="padding-top:5px;"><h3>I agree with <a href="/tos/">TOS</a> <input type="checkbox" name="tos" checked="checked"/></h3><br /><br />Supported formats: gif, png, jpg.<br />Maximum image size is 5 MB.</div>

<div style="padding-top:20px;"><input type="submit" value="Upload"/></div>

Any idea on what the problem could be? Thanks

kbp 03-08-2010 04:39 AM

Did you check the TOS checkbox in your curl command line? ... otherwise it could be a cookie issue

All times are GMT -5. The time now is 09:50 PM.