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

HENAR MUÑOZ FRUTOS henar at tid.es
Tue Jan 28 09:23:15 CET 2014


Hi

The object storage GE is having authentication for the accessing to the GEs. This means, that you need a Oauth token for any request. In CC, it is John who is the GE responsible. Perhaps, he can find a solution for your problem.
Sorry for any inconvenience,
Best Regards,
Henar

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

Hi Henar,

What I want to do is enable users to upload fotos. This is working fine. But these fotos need to be visible on my website to everyone. So if I can just download the fotos with an auth token then its no good for me. They need to be public.
In my website I want to sth like this: <img src="path/to/fiware/object_storage/my_container_name/my_object_name" />

-Flo


Am Mo 27 Jan 2014 16:44:12 CET schrieb HENAR MUÑOZ FRUTOS:
> Hi
>
> If you do a GET request to the container you will obtain information
> about the objects. If you do a GET request to the object, yes, you
> will obtain the object to download it. You always need the token to
> work. Can you tell me what your problem is?
>
> Thanks,
>
> Henar
>
>
>
> *De:*Florian Klemt [mailto:florian at klemt.name] *Enviado el:* lunes, 27
> de enero de 2014 15:54
> *Para:* HENAR MUÑOZ FRUTOS
> *Asunto:* RE: Fi-Ware Object Storage
>
>
>
> Hi Henar,
>
> you said that a GET request on the object location would return the
> public URL of the object but it returns the object itself. And i have
> to send the auth token to work. If it would work without the token
> then it is what i want.
> Am I doing something wrong?
>
> -Flo
>
>
>
> "HENAR MUÑOZ FRUTOS" <henar at tid.es <mailto:henar at tid.es>> schrieb:
>
> 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/cont
> anair_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]
> <mailto:[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
>
> ----------------------------------------------------------------------
> --
>
> 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

________________________________

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