Giter Site home page Giter Site logo

pomf / pomf Goto Github PK

View Code? Open in Web Editor NEW
877.0 25.0 80.0 3.08 MB

Pomf is a simple lightweight file host with support for drop, paste, click and API uploading.

License: MIT License

JavaScript 25.45% CSS 18.70% Makefile 7.46% PHP 48.39%
pomf file-upload files upload file-sharing file hosting nginx php sqlite-database

pomf's Introduction

Important Notice

Please note that the development of this codebase has been surpassed by Uguu. As a result, Pomf should be regarded as outdated since this code has not received updates for quite some time.

Uguu offers the identical appearance and functionality to Pomf, with the exception that you can skip the file expiration configuration during setup to achieve the same functionality.

pomf's People

Contributors

benwaffle avatar borkedup avatar dependabot-preview[bot] avatar dependabot[bot] avatar ewhal avatar jaex avatar jamiew0w avatar jithatsonei avatar lesderid avatar liilac avatar lolcatsv2 avatar luminarys avatar nokonoko avatar nuckchorris avatar r3c0d3x avatar spekulatius avatar ssh-rsa avatar v0l avatar yrrah2 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  avatar

pomf's Issues

Uncaught Error: Call to member function bindValue()

Good day. I've never used Pomf before, so excuse me if this is obvious and I'm stupid.

I've got an instance running Ubuntu 16.04, with SQlite3 and NGinx running on it. I set up the Pomf database as per the instructions and it all seems correct. I'm trying to use Pomf on my website. I've got it all running but when I try to upload a file, the status bar goes up, then at 100% it just says Server Error!

Going to /var/logs/nginx/error.log and I find that it's thrown this error:

2017/09/12 16:12:33 [error] 7441#7441: *7 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught Error: Call to a member function bindValue() on boolean $ Stack trace: #0 /var/www/pics/upload.php(228): uploadFile(Object(UploadedFile)) #1 {main} thrown in /var/www/pics/upload.php on line 107" while reading response header from upstream, client: 68.233.207.162, server: pics.trekintosh.com, request: "POST $

Can anyone shed some light on this for me? Am I just being stupid or is it a genuine issue?

Do not rewrite changlelog history

@ewhal
b0ccd22

Unless they were never true in the first place, you should not remove changelog entries. This is akin to rewriting public git history. You should instead create a new entry, clarifying the previous was undone.

Allow uploading from URL

I would expect this to be used like

requests.post(
    "http://pomf.website/upload.php",
    data="http://image.url/here"
)

Cant read settings file

Hello all,

Installed both Pomf and Moe, both work fine. However, when trying to upload a file (.jpg, .png, etc), I receive the following error:

Cant read settings file.

I have already checked permissions and have done as said in the documentation. Not sure where to go from here.

chown www-data:www-data /var/www/db
chown www-data:www-data /var/www/db/pomf.sq3
chown www-data:www-data /var/www/files
chmod 775 /var/www
chmod -R 775 /var/www/

Prevent others from uploading to server

It's probably been documented somewhere and asked before, but what can I do to prevent random people from uploading to my private pomf? I'd prefer an api or user/password solution if possible that is compatible with ShareX.

Thank you.

paste

this feature of mine is made out of cobbled together spaghetti and tears, clipboard grabbing needs a rewrite to latest mozilla suggestions, and the HTML elements desperately needs to be redone to something that doesn't looks horrible and makes me cry everytime i upload to a clone.

The actual pseudo code itself is sound, but our implementation is certainly not the best

Filename URL encoding

We do not handle URL generation properly: {"success":true,"files":[{"hash":"f56c05af7e48906f27de6f2b24f79339cbd0084a","name":"test.foo bar","url":"https://my.mixtape.moe/vnbgno.foo bar","size":14}]}

should've been /vnbgno.foo%20bar
The file extension doesn't seem to be URL encoded.

(can ask cslr on IRC)

Javascript 2nd copy button doesn't work

All copy buttons except the first one don't work in chromium 51.0.2704.84 (Developer Build) (64-bit).
When clicked they return the error 'Discontiguous selection is not supported.(anonymous function) @ pomf.min.js'

Filename sanitization

I just saw a original filename with single quotes around it
so the extension ended with a single quote

originalfilename: 'filename.ext'
filename: asdfe.ext'

not sure this is desired, just bringing it to your attention.

Consider defaulting to SQLite instead of MySQL

At the moment, readme instructs users to install MySQL to get pomf to function (though mentions other databases may work).

MySQL, or any full SQL server, is completely unnecessary (though of course there's nothing wrong with using it) for something like pomf. It is an unnecessary dependency, and complicates installation. Many might lazily set it up, leaving it in a potentially insecure configuration.

SQLite is completely self-contained, and requires no configuration. The only change necessary to the code, would be changing the placeholder references to a MySQL server/database in settings.inc.php, to a suitable URI pointing to a location for the SQLite database file.

Missing config files

After cloning latest master i can't seem to find the templates/site_variables.json file.

Is it just me failing or isn't this anywhere in the repo?

remove sqlite

It was a shitty implementation and would even require a re-write of moe to make it work.

Suggest we remove it altogether as I don't know any clone who would bother with it.

Hash algorithm migration supposed to be completed

https://github.com/pomf/pomf-php/blob/master/classes/UploadedFile.class.php

This is not horribly difficult to do. There are two components

  • replace SHA-1 with SHA-2 in above
  • replace all existing hashes in DB with new one

The latter would be CPU intensive, so running it may need to be planned (and ensuring it has low nice value, etc). It should not be very difficult to generate new hashes in the background, then when ready, use new code that checks SHA-2 hashes.

merge pomf-php into pomf

Well apparently I have mood swings about this but the gist cats_ made in #pomfret (https://gist.github.com/alucard0134/b5e5e80f68980aa27a5f35cf2a9b0a62) quoting "holy sSSHIT MAKE SURE YOU HAVE --recursive BECAUSE SOMEONE THOUGHT IT'D BE GREAT TO PUT THE PHP FILES IN A FUCKING SUB MODULE (LIKE THEY'RE OPTIONAL??)"

From the git doc on submodules:
"It often happens that while working on one project, you need to use another project from within it. Perhaps it’s a library that a third party developed or that you’re developing separately and using in multiple parent projects. A common issue arises in these scenarios: you want to be able to treat the two projects as separate yet still be able to use one from within the other."

The php project meets none in the criteria. It is a requirement of the project, but should not be part of its own repo due too it being an integral part of pomf which cannot be replaced (atm)

Comment all code

  • static/js/
    • app.js
  • static/css
    • pomf.css
  • php/
    • upload.php
    • grill.php
    • classes/
      • Response.class.php
      • UploadException.class.php
      • UploadedFile.class.php
  • moe/
    • index.php
    • panel/
      • index.php
      • search.php
    • includes/
      • api.php
      • core.php
      • settings.inc.php

Write separate Makefiles for submodules

As they are intended to be independent, they should have their own Makefiles. Note, this will not require them to be run separately; they will be run recursively from the main Makefile when specified.

I am happy to write them at some point, so feel free to assign me to this.

Custom Expire Options

Make a dropdown table for expiration options ex:

1 hour
12 hours
1 day
1 week
1 month
@pomf/developers pls

Unbloat readme

We are moving to readthedocs since the readme file is getting quite large now, but is still widely unfinished, you can contribute to pomf-docs to finish it

also obligatory @pomf/documentation

modernize it?

modernize it with nodejs codebase. this project it self is very attractive, and still got lots of pissibility. but the code and tech is outdated.

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.