ndik11 / skynet

New age social network :)
3 stars 0 forks source link

Uploading functionality #16

Open roch1990 opened 7 years ago

roch1990 commented 7 years ago
roch1990 commented 7 years ago

Under the hood:

  1. Using local storage's:

    • skynet/upfiles//images//
    • skynet/upfiles//images/avatars/
  2. New model "Albums" addition:

    • album_id (unique)
    • album name (unique)
    • path to photos (like p. 1)
    • relation to User model
  3. Additions to User models:

    • relation to Album model
    • avatar name (link to path p.1 ch.2)
  4. Add template and rooting:

    • settings
  5. Do it like this:

  6. Templates to uploading:

    • settings
    • photos
  7. Algorothm:

    • Check file name
    • Check file extension (.jpg, .png, *.bmp at forst itteration)
    • Uploading to user folder
    • Redirect to ? page
    • Show images by jinja in teplates