Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 03-07-2010, 07:49 PM   #1
LQ Newbie
Registered: Mar 2010
Posts: 4

Rep: Reputation: 0
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
Old 03-08-2010, 04:39 AM   #2
Senior Member
Registered: Aug 2009
Posts: 3,790

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


bash, curl

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
BASH variables, quotation marks and cURL struggles matthias_k Programming 13 01-27-2013 05:56 PM
big problem with curl and bash holly123 Programming 3 10-25-2009 03:52 PM
Bash variable problem: cURL -b parameter (string form e.g. "name=value;n2=v2") sithemac Other *NIX 3 07-09-2008 07:15 PM
curl dependency issues in testing/sid almatic Debian 1 06-27-2007 11:54 PM
centos /apache gd / imap / curl I_AM Linux - General 2 06-06-2005 03:35 PM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 03:44 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration