GithubHelp home page GithubHelp logo

hascheksolutions / pictshare Goto Github PK

View Code? Open in Web Editor NEW
810.0 810.0 123.0 41.07 MB

:camera: PictShare is an open source image, mp4, pastebin hosting service with a simple resizing and upload API that you can host yourself. :rice_scene:

Home Page: https://www.pictshare.net

License: Apache License 2.0

PHP 30.62% CSS 31.16% JavaScript 33.70% HTML 3.13% Dockerfile 0.46% Shell 0.92%
docker encryption image-uploader images mp4-uploads picture selfhosted

pictshare's People

Contributors

avolpe avatar cavebeat avatar dependabot[bot] avatar dessalines avatar evaera avatar fn-florian avatar gabe565 avatar geek-at avatar gerripeach avatar henryyang avatar lengshuiyulangcn avatar metalefty avatar quonic avatar ranjit-git avatar rumkit avatar sander85 avatar spair avatar thomasjsn avatar vikbez avatar wpf500 avatar yellowsoar avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pictshare's Issues

s3 backend?

I'd love to roll this out, but having an s3 backend would be great for scaling. Any plans to add this in the future?

requirements

A domain or sub-domain since PictShare can't be run from a subfolder of some other domain

can you confirm, photos.domains or photos.com works but not domains.com/photos?

I guess it doesnt matter, I am getting 404s on the images while even using a.domain.com i have the nginx code in the / location.

checking again =D

Pictshare logo

is the project logo pictshare still available?
can i still make it?

Start a demo with docker, but didn't work

Hi , thanks for the tool.

I want to try a demo, just start it with docker, but i can't upload any image, no error message, and i checked the nginx access.log, it's seem fine.

172.17.0.1 - - [03/May/2017:02:57:48 +0000] "POST / HTTP/1.1" 200 1720 "http://192.168.3.52/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.133 Safari/
537.36"
172.17.0.1 - - [03/May/2017:02:58:11 +0000] "POST / HTTP/1.1" 200 1720 "http://192.168.3.52/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.133 Safari/
537.36"

Valid response back, no image on server

ui-response
Server response is ok
{"status":"OK","type":"png","hash":"1ucq23hnr5.png","url":"http:\/\/192.168.99.100\/1ucq23hnr5.png","domain":"http:\/\/192.168.99.100"}

But image is not present in upload folder

Adding URL upload field to image upload page

I see that it is possible to upload an image via its URL, but it feels a little convoluted and honestly when doing it by hand it's simpler to just download an image and then upload the saved file from your pictshare server front page.

Is there a way to add a form there for uploading remote images without having to manually write it into the application? Just looking for a little place where I paste an image url and hit the Upload button, just like I would hit Browse and upload to upload a locally saved image.

Viewer functionality

He Chris, great work with pictshare, please if possible (or exists) a viewer for pictshare admin through view all images uploaded ?

Some Videos can't play on IE 9-11 and Edge

eg this video: https://www.pictshare.net/09ddab5430.mp4

Plays well in all major browsers except for all MS ones. It's strange since the video seems to be h264 encoded (which is the only codec MS Browsers understand)

Some videos only work in MS browsers after they have been resized by PictShare. This points to a codec problem but both videos state they are h265 encoded

docker

Hello, I create a docker file to host pictshare:

FROM ishakuta/docker-nginx-php5
MAINTAINER Arturo Volpe <[email protected]>

RUN apt-get update && apt-get install -y php5-gd

WORKDIR /opt
RUN curl -O https://codeload.github.com/chrisiaut/pictshare/zip/master

RUN apt-get install -y unzip

RUN unzip master
RUN mv pictshare-master pictshare && rm master

RUN apt-get install -y php5-fpm

WORKDIR /opt/pictshare
RUN cp inc/example.config.inc.php inc/config.inc.php
RUN chmod +x bin/ffmpeg

ADD pictshare.conf /etc/nginx/sites-available/default
ADD pictshare.conf /etc/nginx/sites-enabled/default

RUN chown -R www-data:www-data /opt/pictshare

And a nginx config file:

server {
    listen 80 default_server;
    listen [::]:80 default_server ipv6only=on;

    root /opt/pictshare;
    index index.html index.php;

    # Make site accessible from http://localhost/
    server_name localhost;

    location / {
        try_files $uri $uri/ /index.php?url=$request_uri; # instead of htaccess mod_rewrite
    }


    location ~ \.php {
        fastcgi_pass unix:/var/run/php5-fpm.sock;
        fastcgi_index index.php;
        include fastcgi_params;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        fastcgi_param PATH_INFO $fastcgi_script_name;
    }

    location ~ /(upload|tmp|bin) {
       deny all;
       return 404;
    }

}

However, I has a question about multiple instances of pictshare using a single data folder, is this posible with the current implementation of pictshare?

Image hashes are not calculated correctly for JPEGS

If the same image is uploaded multiple times, pictshare should only save it once but because of an error in pictsharemodel.php the sha1 hash is created BEFORE removing exif info from JPEGs so the image is different when saved.

Re-render all uploaded mp4 videos

So we can make sure they are in a format that every browser understands (looking at you, IE and Edge who can't render MP4 videos if they use a different codec)

backend.php to return image dimensions

I was looking to the backend.php, but as I am not a PHP developer I don't know how to do it.
How simple would it be to add the original image width and height to the API response?

Delete image

Hi, and thanks for sharing pictshare !!
Upload is working perfectly but delete has some glitches...
I'm using a post call and although delete works, it returns 404 with this html message
Warning: unlink(/var/www/vhosts/xxx/xxx.com/upload/delete_temp.csv): No such file or directory in /var/www/vhosts/xxx/xxx.com/models/pictsharemodel.php on line 145.
I have the same behavior even if I send the delete url by hand.
Am I doing something wrong ?

Hash is not deleted with image

Whenever I delete an image with the master delete code, if I later attempt to upload the same image, I get a broken link.

I would presume this is because it is attempting to link up the old hash, which still shows up in the hashes.csv.

screenshot 2

Master delete key

Master password key that if included in URL will delete the image and all cached versions of the image

missing '/' in url returned by upload api

I've set up using docker, and before the docker is just an nginx reverse proxy with the domain like mydomain

however when I try to upload an image, I got the response without the '/'

curl -s -F 'postimage=@test_img.png' -XPOST https://mydomain/backend.php | jq -r .url
http://mydomainrm0tr9oc0l.png

keep track of requested images

I want to be able to delete images which haven't been requested for years but in order for this to be possible we need to implement some kind of logging system per image

[idea] Onsite backup/copy

Recently backblaze was integrated to upload all (base) images for high availability and cluster support

But it would be nice to add a setting where every image/mp4/gif/etc.. is copied to a specified local path (can be outside the pictshare directory). If a hash is not found in the normal pictshare data directory, the "copy path" will be looked at

The idea is that this "copy path" can be a mounted share like on a backup disk or even nfs/smb share

This would allow for on premise/on site backups and clustering where all pictshare instances can also mount to a local share

PHP version support / contributing

I want to contribute changes, including:

  • PSR-2 coding standards
  • Refactoring the base classes
  • Updates to follow best practices

Some questions before I go ahead:
Would you be happy dropping support for PHP 5.6? PHP 7 has numerous advantages.
Are there any other coding standard / practices would you like to adhere to?

base64 upload issue

not sure what causes it, but same file with regular binary upload works fine.
base64 mode returns with following :
<br /> <b>Notice</b>: ########## FILETYPE: image/png in <b>/usr/share/nginx/html/pictshare/models/pictsharemodel.php</b> on line <b>761</b><br /> <br /> <b>Warning</b>: imagepng(): gd-png: fatal libpng error: Wrote palette index exceeding num_palette in <b>/usr/share/nginx/html/pictshare/models/pictsharemodel.php</b> on line <b>790</b><br /> <br /> <b>Warning</b>: imagepng(): gd-png error: setjmp returns error condition in <b>/usr/share/nginx/html/pictshare/models/pictsharemodel.php</b> on line <b>790</b><br /> <br /> <b>Notice</b>: ========= SAVING AS png TO /usr/share/nginx/html/pictshare/tmp/d710q79fd5.png in <b>/usr/share/nginx/html/pictshare/models/pictsharemodel.php</b> on line <b>791</b><br />

after this, file is saved but when accessing it via web, it always return zero sized image

Better mp4 compatibility on mobile

since we don't know where the videos are coming from we should re-encode everything with ffmpeg using the -vcodec libx264 -profile:v baseline -level 3.0 -pix_fmt yuv420p -vf "scale=trunc(iw/2)*2:trunc(ih/2)*2" parameter

hi

i design logo/icon for "open source projects" on utopian ..
i thınk your project need a good logo whıch make your applıcatıon vıew better..
wanna me desıgn a logo "free" for your applıcatıon?

please reply my post... ı ll start do design and share with you and than send a post on website "utopian.io"..
also u can connect wıth me on discord "@ahmeterbay" or emaıl "[email protected]"

Update UI

I'd like to rewrite the UI (upload form) so files can be dropped anywhere on the page and make it look maybe more modern (flat)

Self-signed URLs for upload

Similar to S3, would be nice to be able to get a self-signed URL, so my application could upload directly an image to PictShare without going via backend.

I don't want to expose the secret to upload the images on my frontend application.
So right now to solve that issue, I upload the image to my backend, and then the backend uploads to the pictshare.

My suggestion would be a way to accept uploads from the frontend without having the secret in there.

Make an option to be API only

Hello, this is an excellent application, and I am going to start to use it as my private Image hosting API.

I miss the option to hide all the interfaces, and to be API only.
Is there a way to do it? If not, I leave here the suggestion.

upload image from cordova

Hi there thanks for this great piece of work I've uploaded all files working just fine.
I have one question though I've tried to add the url for upload in my hybrid app in view to upload the image via cordova.
you have mentioned in your readme file the following.
UPLOAD_CODE
If set, will show users a code field in the upload form. If it doesn't match your setting, files won't be uploaded.
If enabled, the Upload API will need the variable upload_code via GET (eg: https://pictshare.net/backend.php?getimage=**https://www.0xf.at/css/imgs/logo.png**&upload_code=YourUploadCodeHere)

what if I am uploading the image from my phone there will be no url per se.
in my file I have the path of the image only.
Any help will be much appreciated

Can't show pictures after uploading

Sir. I like pictshare very much. But I failed many times when I tried to install it on my VPS (CentOS 7 & LNMP). I can find the picture in upload folder after I upload picture 001.jpg like this

- upload
  - 001.jpg
    - 001.jpg

But it can't show after finishing uploading. https://img.muzi.moe
Hope to get your helps. Thank you!
Screen Shot 2017-06-21 at 16.45.40.png

Allow SVG uploads

title says it all. Obviously resizing would not be needed but maybe svg to png or jpg conversion?

Watermarks

Optional setting to add an image or text as watermark to every image (and video?)

Watermark settings:

  • Text/image
  • Opacity
  • position
  • proportional size to image

add custom hashes (image IDs)

for now the site will generate the name of the images automatically (randomly) but it would be nice to allow users to add their own hashes.

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.