Comments (1)
or for easier way to sort the files you can do several steps of splitting like 'extension' then first 2 characters
example :
1- 78805a221a988e79ef3f42d7c5bfd418.png
/files/png/7/8/78805a221a988e79ef3f42d7c5bfd418.png
2- 943359f44dc87f6a1679c987280e8dc7.jpg
/files/jpg/9/4/943359f44dc87f6a1679c987280e8dc7.jpg
this way u wont need db's and extra resource consumption just a tiny line that will read the filename and return the path
$ext = end(explode('.', $filename));
$imgfile = /files/$ext/$filename[0]/$filename[1]/$filename
and for the upload it should be pretty much the same where u check if the directory of the first chars exist or if u want to create empty directories to save the mkdir time its up to u
cheers
from zimg-host.
Related Issues (20)
- prevent upload links from your domain
- columns css bug
- xss
- Box at the end that contains all the links
- Shorter URL / Filename HOT 2
- Drop file upload HOT 1
- Remove jQuery and jQuery.Forms HOT 1
- Javascript file validation
- New design template HOT 1
- Password protect upload? HOT 2
- Not Showing correct links HOT 17
- If there is a wordpress plug-ins on the better. HOT 1
- BB Code HOT 2
- Button to copy HOT 1
- Button "FILE" HOT 1
- Is their a way to customize it? HOT 1
- img.ziggy.org is down HOT 3
- When I upload the image, I can access it, but in a few days I will prompt 404.
- Can't upload anything from URL
- doesnt do anything when i try to upload
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from zimg-host.