How does one code a pic into VASL using dropbox

Joined
Mar 21, 2015
Messages
871
Reaction score
35
Location
Oz
Country
llAustralia
Hi,

I have just spent 5 hours trying to work out how to get a picture to load from Dropbox unto a VASL map.

With all the fancy coding some people do one would think this would be easy. Wrong.

Needless to say it will be a external image and Dropbox will have http:// name here.

It is getting this into VASL that then displays an image that is the problem.

https://www.dropbox.com/s/pj5swjj7xvoj8a9/OKW PIC.JPG?dl=0

Please if anyone can do this let me know.

thanks
 

zgrose

Elder Member
Joined
Jun 13, 2004
Messages
4,235
Reaction score
948
Location
Kingwood, TX
First name
Zoltan
Country
llUnited States
Dropbox exited the image hosting business. You can try the instructions here but I didn't have much luck with the redirect and VASSAL's HTML support. YMMV.

 
Joined
Mar 21, 2015
Messages
871
Reaction score
35
Location
Oz
Country
llAustralia
Thanks for that. I'm not mad................

Does anyone know another way. ?
 

DougRim

Forum Guru
Joined
Apr 23, 2012
Messages
1,957
Reaction score
2,234
Location
Ottawa
Country
llCanada
Does the image need to come from Dropbox? Could it be on a local drive?

How are you importing it into VASL (regardless of where you are sourcing it from)?
 

Pacman Ghost

Senior Member
Joined
Feb 25, 2017
Messages
590
Reaction score
298
Location
A maze of twisty little passages, all alike
Country
llAustralia
It is getting this into VASL that then displays an image that is the problem.

https://www.dropbox.com/s/pj5swjj7xvoj8a9/OKW PIC.JPG?dl=0
Change the "dl=0" to "dl=1". This initiates a download, rather than using their in-browser viewer. You can't really tell the difference for an image, but try it with an audio file and you'll see the difference (or do a "view source" on the link you posted [omg]). I have Javascript turned off, which is why I didn't see all the shit they put up :-O

This works for me as a label in VASL:
Code:
<html>
<img src="https://www.dropbox.com/s/pj5swjj7xvoj8a9/OKW PIC.JPG?dl=1">
EDIT: Ah, I just clicked on zgrose's link now :-/ which says the same thing. I've had trouble with redirects in VASSAL before as well, but the above works for me :)

And as zgrose said, they're not in the image hosting business any more, so there's no guarantee that these image links will work in the future.
 
Last edited:

DougRim

Forum Guru
Joined
Apr 23, 2012
Messages
1,957
Reaction score
2,234
Location
Ottawa
Country
llCanada
Do you mean server or drive??
Either one. My point being that I am not sure that the source of the image is relevant to the question of how to import it into VASL. Or at least there are two possibilities: (1) VASL isn't finding the image so you may be incorrectly pointing to the source, or (b) VASL has the image for can't display it as you wish for some reason. Two very different problems. It would be helpful to know which one it is. If you can import an image from a local drive or a server without problem then that would suggest your difficulty lies with finding the image on Dropbox.
 
Joined
Mar 21, 2015
Messages
871
Reaction score
35
Location
Oz
Country
llAustralia
I wanted to know how it would be directly possible to host an image from a laptop without it being on a server.

This is what I understand "local" to mean. (Not on a FTP site just .. well .. local).

Otherwise it is on a server and has in essence become international. Is nothing sacred these days....
 
Top