API for CtrlV.in - an image hosting site. Built in Laravel 5.
- https://api.ctrlv.in/docs - the API documentation
- http://ctrlv.in - the website
- https://github.com/antriver/ctrlv-frontend - the website source
(URLs aren't live yet - they're still the old cruddy version)
- An image being anonymous is now a separate setting from it being password protected. (i.e. You can set a password on an image and still show your name on it.) Any existing images with a password have been automatically set to anonymous as this was the previous behaviour.
- Image filenames are more unique.
- Can give an
albumId
when uploading an image so it goes straight into an album. - You can now crop an image multiple times (i.e. you can crop the cropped version). Changed 'uncropped' image to 'original' image. Removed 'uncrop image' endpoint and replaced with 'revert image'.
- Picture: Intervention\Image\Image object representing an actual picture.
- Image: Image metadata stored in the
images
table in the database.
- If you spam requests to rotate image (for example) a bunch of images are created. Maybe an "in progress" flag on images?
- What if jobs are queued for an image that gets deleted?
- PUT /albums/1/images/2 order=123 to reorder album images. Crud forgot about this when putting albumId on the images table...
- Image vanity URLs / non-sequential IDs
- Lock annotations. Change "uncropped" to "original". Replace uncrop/un-annotate with revert to original. Allow re-cropping.
- Batch requests for deleting images / adding to albums / removing from albums
- OCR
- API Keys
- Start again button on uploader should delete uploaded image (and/or we should have expiresAt on those images)
sudo -u www-data php artisan queue:listen --tries=1 --sleep=0 -vvv --timeout=600
grunt build-api-docs
/etc/supervisor/conf.d/ctrlv-api-worker.conf
[program:ctrlv-api-worker]
process_name=%(program_name)s_%(process_num)02d
directory=/var/www/ctrlv-api
command=php artisan queue:work beanstalkd --sleep=1 --tries=2 --daemon
autostart=true
autorestart=true
user=www-data
numprocs=2
redirect_stderr=true
stdout_logfile=/var/log/ctrlv-api-worker.log
sudo supervisorctl start ctrlv-api-worker:*