try change to this one
$upload_dir = wp_upload_dir();
$fp = fopen( $upload_dir["basedir"] . '/artworks.js', 'w+');
Related Posts:
- Can’t upload media, permissions are correct
- Media not actually deleted on disk when click “Permanent Delete”
- What permissions does wp-content/uploads need?
- WordPress monthly upload directory owner set to root
- Moving Media Library
- Maximum upload size changes in php.ini ignored – How to remove upload size limit?
- What error logs can I check to see why plugin updates are failing?
- Copying uploaded images not working in wordpress
- The uploaded file exceeds the upload_max_filesize directive in php.ini
- Hide images from anonymous user?
- User permissions to upload images
- wordpress upload permission on nginx & ubuntu
- How do I force WP to set upload directory permissions correctly?
- How to upload prc file type?
- Unable to upload anything to WordPress site
- I migrated WPMU site: Unable to create directory uploads/… Desperate for help!
- Used Duplicator to transfer a site. Now my media uploads aren’t working
- Problem uploading files, after changing domain name
- Basic File/Post restriction plugin
- Cannot upload themes. Error: “The uploaded file could not be moved to /var/www/wp-uploads/localhost/2011/10.”
- How to assign multiple file-mime-types to extension?
- Is it possible to reorganize the WordPress uploads directory?
- wp_delete_attachment doesn’t delete images in wp-content/uploads/
- Force WordPress 3.3 to use Flash uploader
- Protecting direct access to PDF and ZIP unless user logged in (without plugin)
- How to restrict images in v3.5 Media Library modal to only those from a specific post id?
- Allow CSV files to be uploaded
- How can I speed up a slow loading media library?
- What to do with unattached logos and header uploaded via native wordpress uploader?
- upload_mimes filter has no effect
- How can you limit the number of images / videos that can be uploaded to a WordPress post
- Failure upgrading / updating site to WordPress 4.7
- Impose a Maximum Limit on Image height and width upload size
- Add item to media library from blob or dataUrl
- How do I enable the customize theme page to accept svg’s?
- Frontend Simple Local Avatar upload
- WP3.5 Media Uploader – how to make it accept multiple images?
- How to define a remote uploads directory?
- Looks like image resize is not working well
- Allowing all/different file type uploads
- Trying to add filename over image in Media Browser
- How Can I pass an image file to wp_handle_upload?
- Upload image from a URL and assign it as a Featured Image to a Custom Post Type?
- Allowed memory size exhausted. WordPress side solution
- Prevent File Uploads other than images
- how to change max file upload size WordPress 4.9.8 [closed]
- Media handle sideload not working
- capability for upload on front-end (An error occurred in the upload. Please try again later )
- How to solve: An error occured in the upload
- What function can I use to override the multisite maximum file size upload restriction?
- List and show uploaded pdf files dynamically
- WordPress Fancybox Resize Large Image
- WordPress suddenly starts uploading media to an old (backdated) folder
- Delete files uploaded using the wp_upload_bits() function
- wp_handle_upload() does not list uploaded file in the media library?
- Error uploading image in WordPress
- Can I change the URL of a video, or upload a video to a specific URL?
- The uploaded file could not be moved to wp-content/uploads/2019/07
- wordpress media upload given An error occurred in the upload. Please try again later
- Using wp_enqueue_media() with switch_to_blog() issue
- WordPress won’t write in a CIFS drive from himself
- WordPress Media Library – Upload space used
- What relationship determines which images appear in ‘uploaded to post’ in edit/add post media dialog
- Check for file extension or mime type fails
- Error when upload images larger than 1024px [closed]
- uploaded images not going to /uploads folder
- Setting image upload absolute path?
- Set different max upload size limits based on file type/extension
- how to change wp upload directory to another domain directory
- Disable “Create Audio Playlist” and “Create Video Playlist” in Add Media
- How to make picture appear on wordpress site shared link? [closed]
- limit media upload to once a day
- How to download files to WordPress?
- How to detect when a file has been uploaded?
- wp-content/uploads returns a 404
- Cant upload larger than 100MB
- Multiple images are generated in WP-content in wordpress
- Removing extra large generated images disables all crops
- Missing a temporary folder not fixed
- Upload automatically html files
- Updating the attachment from front end doesn’t show the new change
- Bulk upload images in upload folder does not show in media library
- Is there some way to find if media items are used anywhere on the site?
- Media URL slugs without uploads folder path
- Add more field on WordPress media upload
- Frontend media shows “An error occurred in the upload. Please try again later.”
- File Upload Management
- WP_Custom_Media_Control | Give ID to media file
- WP Add Media Button – Can I set the default size to Original/Full Size
- Files larger than 500 kilobytes are not allowed
- How to split my uploaded media into directories?
- WordPress media upload multiple images
- Media Upload Directory to MMYY instead of YYYY/MM
- Is there a way to force Featured image to show as attachement?
- Auto-Import of WXR File
- Media upload takes too long
- Problems with defining UPLOADS constant
- Updating Media Library PDF’s in bulk
- Assign multiple categories to Media Library upload
- Update media item using wordpress rest api in python