[Fiware-lab-help] Fi-Ware Object Storage

HENAR MUÑOZ FRUTOS henar at tid.es
Mon Jan 27 08:24:54 CET 2014


Hi Florian

Thanks for contacting us.
Firstly, you need to know your tenant Id (follow the information in the slides). In your case is 00000000000000000000000000000914. Then, the URL is:
http://130.206.82.9:8080/v1/tenantId, so http://130.206.82.9:8080/v1/AUTH_00000000000000000000000000000914/
With this URL you are able to obtain information about containers, just write a GET request with the container name and you will obtain the objects in that container. And if you write the object name, you will be able to obtain the url for the object.
http://130.206.82.9:8080/v1/AUTH_00000000000000000000000000000914/contanair_name/object_name

Then, to upload and download files, you can use.

Upload...
token='1232123123123123123213123'
auth='AUTH_00000000000000000000000000000150'
mylocalobject='MyLocalPicture.jpg'
mystoredobject='MyStoredPicture.jpg'

curl -v \
     -X PUT \
     -H 'X-Auth-Token: '$token \
     -H 'Content-Type: application/stream-octet' \
     -H 'Accept: */*' \
     --data-binary "@$mylocalobject" \
     http://130.206.82.9:8080/cdmi/$auth/example_curl/$mystoredobject


download...
token='1232123123123123123213123'
auth='AUTH_00000000000000000000000000000150'
mystoredobject='MyStoredPicture.jpg'

curl -X GET \
     -H 'X-Auth-Token: '$token \
     http://130.206.82.9:8080/cdmi/$auth/example_curl/$mystoredobject \
     --remote-name

If you have any problems, you can contact us.
Regards,
Henar

-----Mensaje original-----
De: Florian Klemt [mailto:florian at klemt.name]
Enviado el: domingo, 26 de enero de 2014 21:31
Para: HENAR MUÑOZ FRUTOS
Asunto: Fi-Ware Object Storage

Hi Henar,

I just watched your latest webinar and I managed to authenticate myself for the Object Storage API on Fi-Lab and also uploaded some new objects with the API. The only thing that is missing is to be able to get the public URL for an object.
I want to upload pictures and then use them in my website. So i just want to set the href attribute of the <img> tag to the url of the picture. I know this must be possible somehow because when I download an image from the cloud portal I can see the url in my download history.
When I open this url in my browser I can see the picture.
How do I get this url with the API?

Thanks very much
-Flo

________________________________

Este mensaje se dirige exclusivamente a su destinatario. Puede consultar nuestra política de envío y recepción de correo electrónico en el enlace situado más abajo.
This message is intended exclusively for its addressee. We only send and receive email on the basis of the terms set out at:
http://www.tid.es/ES/PAGINAS/disclaimer.aspx



More information about the Fiware-lab-help mailing list

You can get more information about our cookies and privacy policies clicking on the following links: Privacy policy   Cookies policy