Ok,
As it’s front-end… I might:
-
Set up the folder on the server so that WordPress can read/write (775 or 755 ordinarily works depending on how your server is configured in terms of user/group permissions).
-
Allow a user on the front end to see the files or choose which file to delete
-
Upon choosing the file, pass the parameter to an intermediary PHP script
- /wp-themes/mehmehmeh/deleteFile.php?filename=somefile.ext
-
In deleteFile.php put the code to do the actual file deletion and report back success/failure to the front-end user.
I am not sure about security on this… I would maybe store details of who owns a given file if its a shared folder and then check that user is the one logged in before allowing them to delete. Sort of a front-end permissions if you will?
Related Posts:
- Accessing a random image via ajax
- Why is $_REQUEST an empty array in admin-ajax.php?
- Image upload via FormData API and AJAX is not working ($_FILES always empty)
- How do I Import / Upload Files with jQuery AJAX?
- Get uploaded image and attach it to the new post
- Convert canvas to image and upload image to server
- Allow user to Upload image and manipulate it on the frontend
- Is custom behaviour possible when asynchronously uploading?
- WordPress will suddenly stop saving files uploaded by my code (ran in nopriv ajax)
- WordPress directories not writable after PHP version upgrade
- Upload multiple files via ajax from an HTML file input
- Change the filename format of saved featured images
- Rename image uploads replacing “width” and “height” in filename with “medium”, “large”, “small”
- Modify image while uploading
- PHP calling AJAX function that relies on passed PHP function values not working
- Upload images and attachments from frontend form
- Looking for a better way to handle an ajax script that pulls in post data on click
- How to add default images into theme customizer image control?
- Adding featured image via PHP
- How to enlarge the media file upload size in wordpress admin
- Can’t use get_results() in ajax query
- Debugging PHP object during Ajax call in WordPress
- WordPress Ajax Data problem
- Access/update database with jQuery
- How to display something in a div when the user clicks on a text in another div – no page refresh [closed]
- Passing jQuery value using Ajax to a page template
- How to set a custom path, for ajax image upload folder in admin?
- wp_handle_upload – The uploaded file could not be moved to wp-content/uploads/2012/09
- Memory errors with media upload, WordPress can’t use more than 96M (while there’s 512 available!)
- ajax_object is not defined when ajax calls the function
- Page Reloads Before AJAX Request Finishes
- Why is this Ajax not working?
- Ajax return code 400
- How to make drop down post title
- Create onClick Event to Re-load a Widget
- ajax, right way to do it and make it works?
- WordPress ajax doesn’t display object method on jQuery .change() function
- Problem with custom plugin using AJAX to pull info from php file
- Call a PHP Function with Multiple Parameters that is outside the AJAX Handler
- Need help with Google drive API [closed]
- Is it possible to intercept all ajax requests and get the parameters and the returns?
- Can’t upload image using media_sideload_image
- WordPress, AJAX and pre_get_posts using conditional tags
- Refresh table data with Ajax
- Setting value of session with Ajax not working
- Ajax contact form return 0
- AJAX – Returning Two JSON Objects with One PHP Function
- Can I get an email notification when media is uploaded to the media library?
- unable to use ‘new WP_Query’ in AJAX call
- admin-ajax Firing Error 400 When Logged In
- is_user_logged_in() not working in AJAX validation call
- Add Ajax Hooks and Call from Custom Template PHP
- WordPress Ajax Always returning 0
- Woocommerce with Lazy Load php and ajax
- Ajax filter button display all posts
- Can I make get_users() query global?
- Compare $_POST returned values with term array
- My jQuery Ajax form submit is still refreshing page?
- Submitting a form, using Ajax, to run a SQL Select query based on user input from the form
- Incrementing PHP variable onclick to display posts by month
- calling admin-ajax.php from admin-ajax.php
- WordPress Custom Add To Cart Button with AJAX
- WordPress cascading dropdown selection search based on Parent Page & Child Page
- Display WordPress search results based on the selected Sub-Category
- Using some Loop or repeatable fucntion in AJAX and PHP to reduce repeatability
- How can I update WordPress plugins or WordPress itself in all server?
- jquery & ajax getting data from php in wordpress . admin-ajax.php returns 400
- Settings API form – submit with AJAX
- How do I call a value from the datase using ajax
- async upload not working when not logged
- WordPress loading all local images from specific directory?
- Where to add my PHP codes for AJAX Jquery to work?
- Adding ELSE argument to AJAX Live Search for “No results found”
- How to use wp_ajax_set_post_thumbnail?
- register_block_type is not working properly
- Submit remote form to wordpress REST API and save data to custom post type
- WooCommerce REST API AJAX Auth – 401 response
- AJAX numerical pagination problem in TwentyFifteen-child theme
- How to reload a php script, using AJAX and jQuery
- Filtering custom posts by using checkboxes for taxonomy in an ajax loop always gives server 500 error
- Why my Ajax events are no longer detected after dynamic change of shortcode content
- Contactform7: display results from CURL
- Offset with ajax load more posts duplicates
- ajax polling with admin-ajax.php
- Woocommerce variable products are being added to the card on the homepage (ajax)
- Upload images from one server to an other in wordpress
- A javascript function that simply runs a php function on the plugin
- Ajax not updating to database
- WordPress 404 when using AJAX to call php function
- how use php query in AJAX jquery
- Submitting my form to the database and then redirecting to payment site
- MySQL query in WordPress with AJAX
- wp_delete_comment is doing nothing
- Plugin PHP write permissions
- Pass the updated value of aid from form using ajax
- AJAX with Selectbox Plugins (Select2, Chosen, Selectize)
- Fatal error: Uncaught Error: Call to undefined function wp_nav_menu()
- Data inserted in database, but ajax calls error function
- Correct way to perform a GET to another PHP file hosted on wordpress
- using AJAX [object Object]