Jump to content

Utilizar API Wupload

Recommended Posts



Tenho a seguinte API:


This API call allow you to upload in your existing Wupload account.

getUploadUrl (login required)

Get an upload url for logged in users

Assumed response fields:
- url
- max-filesize (limit per file)

Then you should take the url, and send the file(s) there.

@important You will have 24 hours to complete the upload.
           The response of the second call (the upload) will be the informations on the file, including the download url.

@restriction The maximum number of files that can be sent in the same query is 1.
             If files are bigger then the max-filesize, the upload will fail.
             The upload only work for logged in free and premium users.

@see FSApi_Auth::login

@return Array

@example http://api.wupload.com/upload?method=getUploadUrl&u=USER-EMAIL&p=PASSWORD
         Let's say this return the url http://s0.wupload.com/abc
@example HTML: Your application should generate a post equivalent to :
         <form action="http://s0.wupload.com/abc" method="post" enctype="multipart/form-data">
             <input type="file" name="files[]" />
             <button type="submit">submit</button>
@example CURL:
         curl -vF "files[]=@myfile.zip" "http://s0.wupload.com/abc"

Já consigo fazer a primeira parte, ou seja, fazer o primeiro pedido que vai ao servidor e devolve a resposta em XML com a informação.

Mas no segundo passo tudo se complica. A API diz "Your application should generate a post equivalent to...". Já tentei de várias maneiras mas nunca consigo fazer que funcione...

Se alguém  puder ajudar.  :cheesygrin:

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...

Important Information

By using this site you accept our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.