I am trying to compress images on client side using JavaScript on some low bandwidth devices and I’m currently stuck in a limbo using the HTML5 File API. I’m new to this, please bear with me if I’m missing something important. I have some input tags which should ideally open the mobile camera, capture single image, compress and send files
Tag: file
Remove files which have not filename duplicates
For each document (.pdf, .txt, .docx ecc) I have also a corresponding json file with the same filename. Example: file1.json, file1.pdf, file2.json, file2.txt, filex.json, filex.pdf, But I got also some json files which are not accompanied with the corresponding document. I want to delete all json files which have no corresponding document. Im really stucked because I cant find a
If php session exists, then download file a file from .htaccess locked folder
I have been looking to find a good guide on how to securely download files from a website only if a user session exists. The files in the download folder should NOT be accessible if a user session doesn’t exist. Therefore I assume the folder the files are stored in needs to be “locked” by a .htaccess file? Alternatively stored
Laravel 8 file upload validation fails with any rule
I want to validate a file upload but with literally any validation rule, I get “The (name of input) failed to upload.” I’ve seen this issue in a few places but none of the solutions worked for me. I’m using Laravel 8.0, php 8.0.2, and nginx/1.18.0 on ubuntu. Controller: Blade file: If I get rid of the validation rule for
PHP opens and closes file, but does not write anything to it
I have spent a couple of hours reading up on this but as so yet I find no clear solutions….I am using WAMP to run as my Local server. I have a successful API call set up to return data. I would …
How to build login system so that only last user logged in can save?
I am working on a simple project where I have a login system with multiple users where each user will login and save form entries in a file. Idea is last user who is logged in should always have the write access (and all others write access should be revoked) and if last user logs out then second last user
Problem with link to file, javascript, xml, object FormData
I have a function that allows you to select an attachment, but I can’t get the file paths from it to send it to php. Can it be done without using forms and reloading the entire page? I update my function, but they return: from=s@p.pl&temat=da&msg=da&usser=lalala&file=[object FormData] What I can do with it? I need link to file. Function like this:
How can I auto populate previously uploaded file using html and php?
I want my previously uploaded file to be automatically selected while I am editing details which also include file upload. I have used value attribute as in other types. But this doesn’t work. I have to select the required file again while I am editing details. No file is selected as default while editing. I want to edit other details
How to solve the fatal error in require_once
My project has two entry point for example File 1:/index.php ( first entry point) – here we include the config form the config folder File 2:service/service.php – here we include the config form the config folde if i call the File 2:service/service.php has no fatal error but when i call the File 1:/index.php it became the fatal error as failed
How to remove/ignore .htaccess file from gallery feed
Good day! I’ve mafe an infinite scrolling gallery and it works as intended, php code supplies the the feed with images with this code (below) from the directory. However there is a problem, I can’t …