Found a solution. Went into the media library and found the URL of the file in there and now it works.
Related Posts:
- Setting wp_temp_dir and permissions not working for “Missing A Temporary Folder” error
- wp_temp_dir does not change the /tmp temporary default directory
- Can’t write pdf file to upload directory using FPDF
- Change default uploads file using wp Skeleton
- Adding Adobe files to a wordpress site [closed]
- Placing assets for external use
- WordPress HTTP Error on File upload
- Interface for logged-in users to upload/download files
- Right way to download file from source to destination
- Uploaded images result in a file url with full path on disk appended
- Where to store sensitive uploaded file?
- Private file system for attachments
- Plupload Intergration in a meta-box?
- Can I upload media to a specific folder?
- How to Require a Minimum Image Dimension for Uploading?
- WordPress 3.5: Setting custom “full URL path to files” in the Media Library?
- Get $image_id after uploading with media_sideload_image()
- simple solution for restricting access to (some) uploads/downloads
- how to upload and allow downloads of .mobi and .epub formats
- Allowing WebP uploads?
- Give users a maximum upload capacity; limit the number of files a user can upload OR limit the number of files per upload
- Organize uploads by year, month and day
- Different upload directory based on post type in a theme
- Media not actually deleted on disk when click “Permanent Delete”
- Add inline uploader to plugin option page
- Could a large quantity of files in the uploads folder affect performance?
- WP 3.5 media manager – how to create a working gallery frame
- How to call WP3.5 Media Library manager?
- Disable media library tab for non admins in uploader screen
- I want to replace a media file (pdf) with an updated version
- What are the security reasons to disallow Microsoft Word uploads?
- WordPress Media Manager – limit to specific mime type
- Override json encoding in rest api
- Prevent users from accessing mp3s in my uploads folder?
- Manipulating Media uploader
- How to set file type in wp_handle_upload?
- How to limit file type to be upload?
- Benefits of storing uploads in an assets folder?
- Create custom tab in WordPress 5 media upload
- How to Check Disk Space used by Media Library
- Add/change multipart_params parameter when uploading post image
- How to change the image size in new Media Uploader (ie use medium vs thumbnail)
- Use WP_Filesystem to list files in directory
- White-list file types for media upload
- Gravity Forms – Repeatable “File Upload” field using “gform_column_input_content” filter [closed]
- Intercept request to /wp-content/uploads/random.file
- Add a YouTube or Vimeo video as a post attachment?
- Add media attachment filter to custom wp.media frame
- How to proxy local WP uploads folder to live site
- Upload files to wp-content/uploads – What to add in DB?
- Front-end Image Upload with Preview – Is this Possible in WP?
- How to change “Publish” button text for specific page
- How to add multiple mime with same suffix in wordpress?
- Hook or function to upload media via url
- Close the media-upload thickbox right after upload is finished?
- wp_generate_attachment_metadata generates 503 Service Unavailable or 500 timeout errors
- How can I receive the image id using the media box?
- wp_enqueue_media() Will not load JS on the theme
- media sideload image not working with JPG file
- programmatically create posts from files in a folder
- add_image_size() and uploading the exact size leaves 1×1 image in uploads
- How do I insert an already uploaded video file into my Media Library?
- Split up files from one big folder to multiple folders in uploads after migration
- Display attachments by the ID of the post being edited in the wp.media frame (frontend)
- Media Gallery Upload photo incorrect way like glitch
- WordPress uploads autocreate folder every month
- Enabling users to upload files
- Extra “uploads” added in path
- Is there a way to make my media files unsearchable?
- Error uploading images (but the images are at the server!)
- Is it possible to use media_sideload_image to upload local files?
- How to switch to year/month directory structure format from a single folder
- Attach media to post by media category
- Rename attachment filenames to attachment ID on upload
- WordPress Media Library showing wrong preview size?
- Easing the download of a regularly uploaded pdf
- Get all images in uploads directory and list them
- upload_max_filesize in .user.ini Not Reflected in Media Upload
- Is it possible to import all files from a uploads DIR into WP media, retaining paths to the files
- Embed HTML5 files/subfolders in post?
- How to change archieve frequency of the media file in uploads folder for wordpress blog
- Insert attachments from custom uploader into post (regular uploader style)
- How to download CSV from sub directory in uploads folder
- Import media (.xml) does not attribute featured images to posts
- Upload multiple files
- Modify Maximum upload file size text in WordPress Media
- Sanitizing existing media library paths and page links from foreign characters
- How to change default upload dir?
- Creating an Uploads folder with post ID
- I migrated WPMU site: Unable to create directory uploads/… Desperate for help!
- “Could not write file” error in wp_upload_bits function
- Add media button does not insert image in the editor
- How to find out if all enqueued files are uploaded?
- controlling whether upload is attached to post or not
- Attachment Metadata not updated while uploading audio files
- Is it possible to upload files for wordpress importer over FTP?
- Basic File/Post restriction plugin
- Image in binary in the data to WordPress media library
- All uploaded files using wp_mail() renamed to tmp_name
- Uploading media from non-local host computer