Pomf Documentation, Study notes of Applications of Computer Sciences

This means that most existing scripts and programs will be fully compatible with Pantsu.cat. The only exception to this rule is that Pantsu.cat ...

Typology: Study notes

2021/2022

Uploaded on 09/27/2022

rossi46
rossi46 🇬🇧

4.5

(10)

313 documents

1 / 15

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Pomf Documentation
Release 2.1.0
Pomf and its contributors
Nov 08, 2017
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff

Partial preview of the text

Download Pomf Documentation and more Study notes Applications of Computer Sciences in PDF only on Docsity!

Pomf Documentation

Release 2.1.

Pomf and its contributors

Nov 08, 2017

ii

Pomf Documentation, Release 2.1.

Pomf is a simple file sharing platform. It enjoys a complete API, wide deployment base, and support from numerous screenshot and file uploading tools. See https://try.pantsu.cat for a live example deployment.

Contents 1

CHAPTER 1

Features

  • Single-click uploading; no registration or navigation required
  • Modern and minimalist web interface
  • Drag and drop file uploading supported by the web interface
  • Complete API with multiple response formats
  • Supported by many file and screenshot uploading tools

Pomf Documentation, Release 2.1.

4 Chapter 1. Features

Pomf Documentation, Release 2.1.

2.1.2 Setup PHP

sudo rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm sudo rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm

sudo yum install php70w-fpm php70w-common php70w-mysql sudo vi /etc/php.ini cgi.fix_pathinfo=

sudo systemctl start php-fpm sudo systemctl enable php-fpm

2.1.3 Setup Mariadb

sudo systemctl start mariadb sudo mysql_secure_installation sudo systemctl enable mariadb

mariadb-server mariadb-y mysql -u root -p CREATE DATABASE pomf; GRANT ALL ON pomf.* TO pomf @localhost IDENTIFIED BY 'password'; mysql -u pomf -p pomf < schema.sql

2.1.4 Configure Pomf

git clone --recursive https://github.com/pomf/pomf nano pomf/includes/settings.inc.php

2.2 API

Pantsu.cat has an API that is similar to Pomf.se and the other Pomf clones. This means that most existing scripts and programs will be fully compatible with Pantsu.cat. The only exception to this rule is that Pantsu.cat has scrict TLS 1.0+ only.

2.2.1 Example request

curl -sS -F "files[]=@48_circles.gif" https://pantsu.cat/upload.php

2.2.2 Example response

{ "success": true, "files": [ { "hash": "f0ff06fc9770b96ff040a6016d14140ad6b79570", "name": "48_circles.gif",

6 Chapter 2. Contents:

Pomf Documentation, Release 2.1.

"url": "https://i.pantsu.cat/gltraw.gif", "size": 4824 } ] }

2.2.3 Output description

Attributes Description success true if uploading file was a success hash SHA1 hash name Original file name url URL that the uploaded file can be found at size File size in bytes

2.2.4 Example request

curl -sS -F "files[]=@" https://pantsu.cat/upload.php

2.2.5 Example response

{ "success": false, "errorcode": 400, "description": "No input file(s)" }

2.2.6 Output description

Attributes Description success false if uploading file failed errorcode error code decription description of the error

Upload API endpoint: /upload.php

POST arguments: files[]:

Content-Type: multipart/form-data File to upload; multiple values supported.

GET arguments: ### output: #### gyazo: Content-Type: text/plain

Complete URLs to uploaded files in the same order as the input files, separated by newlines. Does not have a trailing newline (Pomf1 compat version). Example output: txt 'https://example.com/foobar.jpg\nhttps://example.com/qweasd. txt'

text: Content-Type: text/plain

Complete URLs to uploaded files in the same order as input files. Each line ends in a newline (Unix style).

2.2. API 7

Pomf Documentation, Release 2.1.

  • benwaffle
  • wafflestealer
  • lesderid
  • yrrah

2.5. Acknowledgements 9

Pomf Documentation, Release 2.1.

10 Chapter 2. Contents: