kimoa / svg-edit

Automatically exported from code.google.com/p/svg-edit
MIT License
3 stars 0 forks source link

relative path of external image files are not relative to the location of png file. #923

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
version 2.5.1.

My summary is quit explanatory!
But relative to the location of the svg-editor.html.

Best regards,
Karel.

Original issue reported on code.google.com by karel.va...@gmail.com on 8 Mar 2012 at 8:28

GoogleCodeExporter commented 8 years ago
Of course it's not, browsers has no access to local FileSystem due to security 
reasons. Even if you drag and drop a file to input text and see the full path, 
getting the value of text via javascript will only give you the filename.

So your image will need to be relative to your .html. If it's in another folder 
accessible by your webserver then change the path manually inside editor.

Tell me if I misunderstood. Thanks.

Original comment by asyazwan on 9 Mar 2012 at 12:33

GoogleCodeExporter commented 8 years ago
Hello,

Well, I know, but I'm not speaking about the local file system.

But when I load the svg file in my browser without the editor (using an
absolute url in the browser), with a png-file in the same directory as the
svg, it displays it correctly. (my desired behavior)

Then when the svg file is opened using the svg-editor.html, it needs:
- either an absolute url
- either a path relative to the svg-editor.html
to the png file to work properly.

And I was wondering why it couldn't load the png-file from the same 'base'
url as the svg.

Original comment by karel.va...@gmail.com on 9 Mar 2012 at 4:15

GoogleCodeExporter commented 8 years ago
I have the same behavior, this is a valid issue

Original comment by ch...@mobile-develop.com on 8 May 2012 at 7:19