Giter Club home page Giter Club logo

Comments (4)

jeremytubbs avatar jeremytubbs commented on July 24, 2024

Hello,

Are you using the .js or .dzi that is generated by the package?

I plan to not make the output configurable and therefore the naming less strict for the XML .dzi file. The filename is also used as part of a javascript callback in the .js and needs to be validated.

After doing some digging this morning I can allow '_' and '$' in the javascript function name and checking all possible incorrect names is a 11,236 character long regex: http://stackoverflow.com/questions/2008279/validate-a-javascript-function-name

Thanks.

from deepzoom.

klibansky avatar klibansky commented on July 24, 2024

Hi Jeremy,
I think you got me wrong. You are check the file and folder names for there characters.

from deepzoom.

jeremytubbs avatar jeremytubbs commented on July 24, 2024

The file and folder names are set by the image filename if they are not explicitly sent.

Example:

  // folder, file are optional and will default to filename
  $response = $deepzoom->makeTiles('KISS.jpg');

Response:

{
  status: "ok",
  data: {
    JSONP: "KISS/KISS.js",
    DZI: "KISS/KISS.dzi",
    _files: "KISS/KISS_files"
  },
  message: "Everything is okay!"
}

Therefore, I am checking the filename for characters that would invalidate the JSONP. I am working on a fix... You are correct that I don't need the same restrictions for the folder name.

Thanks again.

from deepzoom.

jeremytubbs avatar jeremytubbs commented on July 24, 2024

Filename and Folder Name are now evaluated separately: 8e45923

from deepzoom.

Related Issues (9)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.