Comments (3)
Thanks for taking the time to submit a feature request.
The ability to convert files to and from .webp files is included in v2.7.1 (9f0c9ba). Other newly supported file formats include;
- CRW
- CIN
- DCR
- DDS
- DIB
- FLIF
- GPLT
- NEF
- ORF
- ORA
- SCT
- SFW
- XCF
- XWD
- AVIF
- ICO
As for your request to be able to store converted files on the server, this is a good concept and one that I had actually developed a solution for before HRConvert2 was around. Take a look at HRCloud2. It contains the same conversion engine as HRConvert2 but it also adds user based Cloud drive features as well. It does take a bit more to setup, so keep an eye on HRCloud3 which is probably about a year or so away from a beta version.
from hrconvert2.
AI was thinking about your secondary request a little bit more. This can be accomplished by adding two functional lines of code to the convertCore.php file. Specifically, we would need to add the same line of code twice, as there are two cleanup routines. Depending on where you want your permanent copies stored you could get away with only adding one line of code. The line of code is;
if (!is_dir($DFilePath)) if (in_array(pathinfo($DFilePath, PATHINFO_EXTENSION), $VideoArray)) continue;
If you want to store your permanent copies in /var/www/html/HRProprietary/HRConvert2/DATA then add this special line of code directly underneath the line $DFilePath = $ConvertTemp.DIRECTORY_SEPARATOR.$DFile;
If you want to store your permanent copies in the $ConvertLoc specified in config.php then add this special line of code directly underneath the line $DFilePath = $ConvertLoc.DIRECTORY_SEPARATOR.$DFile;
If you want to store permanent copies in both places, then place the special line of code in both places.
Note that this code is specific to Video files, as you said you would like to store those. If we were going to save documents, we would want to specify the $DocumentArray instead. Scroll up a bit in convertCore.php to see which arrays are defined and what extensions they contain.
If you wanted to move these files somewhere else instead of leaving them in either directory we could do something like;
if (!is_dir($DFilePath)) if (in_array(pathinfo($DFilePath, PATHINFO_EXTENSION), $VideoArray)) if (!file_exists($CustomLocation.DIRECTORY_SEPARATOR.$DFile)) copy($DFilePath, $CustomLocation.DIRECTORY_SEPARATOR.$DFile);
Note that you would only need to add this special line of code once. Then add a line in config.php to define $CustomLocation.
// / Custom location for storing permanent files.
// / DO NOT include a trailing slash.
$CustomLocation = '/path/to/your/custom/location';
Just make sure that $CustomLocation exists and that the www-data user has read/write permissions in it.
Note that in all of these special lines of code we've developed we're doing a couple of things. We are checking if the file HRConvert2 is working on is a directory, because if it is then PATHINFO_EXTENSION would throw an error. In the later code samples we're also checking that a file does not already exist in the $CustomLocation. If it did and we tried to write another one then copy would throw an error.
from hrconvert2.
@zelon88 Thanks for all the responses and help! Good to know WebP is already working. I don't need a full cloud platform at present, but in my home office I have two PCs, right? One where I do my work and gaming, and one that acts as a server/records video and audio from my first PC.
So I'm thinking that I could install the converter on my server-ish PC, and just have it automatically store files I convert. And well, with everything you just wrote, I think that might well be possible. Could probably even make it work in a (privileged) LXD container and mount the relevant data directories as storage in the container...
A project to consider. (He said, adding it to an ever-growing and increasingly impractical list.)
from hrconvert2.
Related Issues (20)
- COPY AND PASTE THE INCLUDED "rc-local.service" FILE TO "/etc/systemd/system/rc-local.service"** HOT 4
- honestrepair.net is down? HOT 1
- Server reqa for 1k online user? HOT 1
- Cannot install on a Synology NAS HOT 1
- Converting files throw error : `failed second stage validation!` HOT 6
- `rar` package unavailable on ARM HOT 2
- v3.1 - xlsx to pdf: failed second stage validation! HOT 9
- Video to Gif conversion HOT 2
- Support for subtitle conversions HOT 3
- Converter is not working HOT 3
- Command line or HTTP Rest API usage? HOT 4
- Conversions not working - <title>404 Not Found</title> HOT 3
- .avi file not shown after successful upload HOT 4
- Docker package for NAS HOT 1
- Hover Tooltips? HOT 1
- Default Dimensions For Photos HOT 1
- Error Timezone HOT 2
- Docker not maintained? HOT 34
- Access by API rest? HOT 2
- The specified Data Storage Directory does not exist HOT 3
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 hrconvert2.