Developer-Community.com

Software => Rightload - Official Forums => Topic started by: frankred on April 07, 2009, 09:32:17 AM

Title: Simple Image Hoster xml - How to create
Post by: frankred on April 07, 2009, 09:32:17 AM
Hi everbody,
i've a big problem. Since 1 week I try to create a rightload server.xml for my image hoster.
It's very Simple. My index.php can receive 3 Paramters

if username and password is empty or isn't correct the file will be uploaded as "anonymous".
This is my XML:
Code: [Select]
<RightloadExport Version="1.5">
  <Servers>
    <Server Protocol="2" Description="rapid-img" ActionURL="http://localhost/myimagehoster/index.php" FormFieldFile="datei" AdditionalFormFields="username=__user,userpass=__pass" FileURLRegex="images/[0-9a-fA-F]{32}.jpg" FileURLMatchPos="1" AutoActionEnabled="False" AutoActionURL="" AutoActionRegex="" AutoActionMatchPos="1" Hostname="ftp.example.org" Port="21">
      <Folders/>
    </Server>
  </Servers>
</RightloadExport>

If the upload was successfull the page returns the image link. Nothing else. No HTML or something. Whats the FileURLRegex for "everything" ^^

The upload works but it's alway as "anonymous". Apart from that, i didn't get on with FileURLRegex, but thats secondary :).

Can somebody help me?
sorry for my bad english i'm a german guy :D
Title: Re: Simple Image Hoster xml - How to create
Post by: nk on April 12, 2009, 02:28:06 PM
The regex for "everything" should be something like "^(.*)$".

To find out why it only uploads as anonymous, you could try adding some debug code to your server script to see what information is actually sent by Rightload. Other than that, I can't really help you, since I don't know what your script actually looks like.