Code Monkey home page Code Monkey logo

imageprocessor's Introduction

http://michaelandrews.typepad.com/the_technical_times/2009/10/creating-a-hashed-directory-structure.html

Pasos previos PT

Subir todas las imágenes originales a S3 en un nuevo bucket con el formato

/XX/XX/XX/XX/XX/XXXXXXXXX.(jpg|png)

donde XXXXXXXXX es el hash del id del padre de la imagen, por ejemplo: typeCode: 01(hotelMain)*

id: 100001

index: 1 (base 1)

hash: 123123123

ejemplo

/01/23/12/31/23/123123123.jpg

Pasos Se hace una petición al servidor con el formato:

/wXXXhXXXt{typeCode}.identificador_{index}.formato

ejemplo:

/w300h200.01_0000100001_1.jpg

Se obtienen los datos de tamaño, nombre y formato y se obtiene la url del archivo en S3

obtiene el hash y binario de los datos de tamaño:

w300h200 ->tamaño

hash: 456456456

y el hash de ls datos de la imagen:

01 -> typeCode

100001 -> id

1 -> index

hash: 123123123

y se busca en el bucket

con el formato:

//XX/XX/XX/XX/XX/XXXXXXXXXX.(jpg|gif)

ejemplo:

bucket.com/01/23/12/31/23/123123123.jpg

*tipos:

  • 01 hotel**
  • 02 roomgalleryItem
  • 03 tour**
  • 04 hotelgalleryItem
  • 05 tourgalleryItem
  • 06 ship**
  • 08 shipgalleryItem
  • 07 cabingalleryitem
  • 08 destination**
  • 09 destinationgalleryItem

**posiblemente se combine con el tipo gallery

3 niveles:

máximo 16,777,216 de carpetas con máximo 256 archivos cada una

máximo 4,294,967,296 archivos

imageprocessor's People

Contributors

raphaww avatar

Watchers

 avatar

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.