-1

i have to test if the cvs file exists and could be downloaded from a webapp, So in the download link element, i see this :

<a class="" target="_blank" download="Myfile(2014-07-01 2014-07-31).csv" href="blob:de3889b8-23d4-4776-bn8f-68f34911fad9">

it is encoded in Base64 using java.

How can i decode the content of href in order to download the csv file? Thank you

Mark Rowlands
  • 5,357
  • 2
  • 29
  • 41
samco cosma
  • 39
  • 1
  • 3
  • 11
  • 1
    this does not look like base64, it looks like an uuid. Edit: This is a UUID Version 4 which is constructed randomly. – Absurd-Mind Aug 13 '14 at 14:29
  • 1
    This does not look like a standard download link. I would guess there is a Javascript routine that runs to download the file. We cannot give an answer to this question without more information. – Kevin Panko Aug 13 '14 at 14:51
  • i think it's in javascript, each time it try to download the csv file it generates this UUID code randomly, so how can i decode this UUID to get the url of the csv file that i want to download? thank you – samco cosma Aug 13 '14 at 15:30

1 Answers1

0

I do not really understand what you are trying to do.

It is a perfectly standard <a href="..."> link with a relative URL of blob:de3889b8-23d4-4776-bn8f-68f34911fad9. So assuming the URL of the current page (the page where you find the link) is http://host.domain.org/app/path/to/page, the download link is :

http://host.domain.org/app/path/to/page/blob:de3889b8-23d4-4776-bn8f-68f34911fad9

Of course, it is not a regular file URL that could be directly served by an Apache HTTP server. It probably means that there is a web application on the server that know what to do with such an URL, maybe logs somewhere at what moment it was used and sends the csv file in the HTTP response.

It is perfectly possible with any web application to generate such UUID containing, or other random Urls, and use them to have a control of who downloads what and when. For instance, the link might expire within few minutes or after first download. The real URL may not even exists if (as suggested by the name) the csv is stored as a BLOB in a database.

Serge Ballesta
  • 143,923
  • 11
  • 122
  • 252
  • Thank you for the -1 and for all replies, i'm going to test this part later. – samco cosma Aug 13 '14 at 16:56
  • @samcocosma I did not downvote, and even vote against close because I'm pretty sure your problem is not with base64 ... But **you** spoke of base64 and it was very attractive for being considered as duplicate. Maybe you could update your question with more details : what is the server, what is the context, and what you cannot do. If you do, I'll try to reopen it. – Serge Ballesta Aug 13 '14 at 17:26