hyrd / jsc3d

Automatically exported from code.google.com/p/jsc3d
0 stars 0 forks source link

Query parameters in URL prevent detection of file format #120

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?

1. Use a SceneUrl ending with "?", for example : 
"https://example.amazonaws.com/files/file.stl?Signature=F5k/cqz0K&Expires=141320
1478"

What is the expected output? What do you see instead?

- It does not load the given file
- Error comes up when console is enabled : "Cannot get file format for the lack 
of file extension."

What version of the product are you using? On what operating system?

Latest SVN checkout.

Please provide any additional information below.

The error occurs around lines 1020 of jsc3d.js, because it does not remove any 
additional parameters in the URL to guess the file extension.

Attached is a patch that fixes the issue (basically, remove anything after "?" 
before detecting file name).

Original issue reported on code.google.com by negatif@gmail.com on 13 Oct 2014 at 11:58

Attachments:

GoogleCodeExporter commented 8 years ago
Thanks a lot, Négatif!

Your patch tests fine! I fixed relative codes following your solution and it 
works as expected now. The repository has already been updated with this 
modification.

Original comment by Humu2...@gmail.com on 14 Oct 2014 at 9:40

GoogleCodeExporter commented 8 years ago
Yay! Thanks for your great 3D Viewer!

--  
Sunny
http://github.com/sunny

Original comment by negatif@gmail.com on 14 Oct 2014 at 5:24

GoogleCodeExporter commented 8 years ago
I'm glad you like it :-)

Original comment by Humu2...@gmail.com on 16 Oct 2014 at 3:08