我可以将媒体上传到特定的文件夹吗?
7 个回答
- 投票数
-
- 2011-09-30
- 转到
Dashboard -> Settings -> Media
- 在在此文件夹中存储上传的文件 中输入所需的位置
- 取消选中 将我的上传内容整理到基于月度和年份的文件夹中
这将指定global 上传位置.要指定每个文件的上传位置,您需要使用一个插件,例如 WP Easy Uploader (不是认可,本身;这只是我发现的第一个).
- Go to
Dashboard -> Settings -> Media
- Enter the desired location in Store uploads in this folder
- Uncheck Organize my uploads into month- and year-based folders
This will specify the global upload location. To specify a per-file upload location, you'll need to use a Plugin, such as WP Easy Uploader (not an endorsement, per se; it was just the first one I found).
-
谢谢!回答了我的问题,您发布的插件看起来绝对完美.不幸的是,自2009年以来就没有进行过更新.我想我应该看看是否有任何最新的可用信息.Thanks! That answered my question and that plugin you posted looks absolutely perfect. Unfortunately it hasn't been updated since 2009. I guess I should probably see if there's anything available that's more up-to-date.
- 0
- 2011-09-30
- jkupczak
-
对于其他人,该插件仍可在WordPress 3.5上使用.但是,这种方式的局限性在于您必须手动输入路径(无法浏览),一次只能上传一个文件,并且必须转到插件才能上传,但并没有.覆盖基本的上传功能.但这可能仍然是最好的文件上传插件.For anyone else looking at this, the plugin still works on WordPress 3.5. However, it's kind of limited in that you have to manually type in the path (you can't browse for it), you can only upload one file at a time, and you have to go to the plugin to upload, it doesn't override the basic upload functionality. But it's probably still the best file uploading plugin out there.
- 1
- 2012-12-20
- gsingh2011
-
WP EASY Uploader不再更新.我发现了[自定义上传目录插件](https://wordpress.org/plugins/custom-upload-dir)WP EASY Uploader is not updated anymore. I found [custom upload dir plugin](https://wordpress.org/plugins/custom-upload-dir)
- 0
- 2015-10-05
- user9
-
- 2013-01-08
除非在其他地方处理存储,否则我建议不要取消"组织媒体"的选择.
由于许多原因,一个目录中存在大量文件是有缺陷的,尽管在某些情况下这是不可避免的,但对于网站而言,这总是不可避免的.
我继承了一个Wordpress网站,并负责将其移至另一台主机.事实证明这是一个问题,因为所有上传文件都放在一个文件夹中,超过93,000个文件-是9.3万个.
没有FTP客户端能够索引那么多文件,并且根本无法导航到该文件夹.
我没有外壳访问系统.
我无法使用托管控制面板进行完全转储,因为没有选择.
我不得不依靠托管公司为我做转储,这本身就是要让他们去做的任务.
除了这些潜在的问题,索引成千上万个文件比索引成百上千个文件要慢-简单来说,在一个目录中使用大量文件会影响性能.
I would advise against un-ticking 'Organize Media' unless in a situation where you are handling storage elsewhere.
Having a large amount of files in one directory is flawed for many reasons, though there is some situations where this is unavoidable but for a website this is always unavoidable.
I inherited a Wordpress website and was tasked with moving it to another host. This proved to be a problem since all uploads were in one folder, over 93,000 files - yes 93 thousand.
No FTP client was able to index that many files and simply would not navigate into the folder.
I had no shell access to the system.
I couldn't do a full dump using the hosting control panel as there was no option to do so.
I had to rely on the hosting company to do a dump for me, which was a task in itself tying to get them to do it.
Apart from these potential issues, indexing thousands of files is slower than indexing tens or hundreds of files - simply, performance is effected with large amounts of files in one directory.
-
不幸的是,日期组织结构对于博客非常有用,而对于没有博客的CMS网站却没有那么有用.似乎应该有一种基于帖子类型(例如,页面上传与CPT上传不同的文件夹)创建上传文件结构的简便方法.Unfortunately, the date organization structure, which is very useful for blogs, isn't so useful for CMS sites that don't incorporate blogs. Seems like there should be an easy way to create an upload file structure based on things like post type (ie, page uploads go in different folder than CPT uploads).
- 8
- 2014-02-04
- Ray Gulick
-
我目前遇到相同的问题.您是否找到了一种在移动主机后拆分文件夹的好方法,还是只保留了现有的93k文件并打开Organize Media?I'm experiencing the same problem at the moment. Did you ever find a good way of splitting up the folder after moving hosts, or did you just leave the existing 93k files as they are and turn on Organize Media?
- 0
- 2014-06-19
- patrickzdb
-
在上述情况下,您可以选择编写一个函数来逐步移动文件(假设您有能力在WordPress安装中修改php文件)in the scenario above, you may opt to write a function to incrementally move the files (assuming you have the ability to modify php files within the WordPress install)
- 0
- 2016-06-03
- ljs.dev
-
- 2013-07-20
该问题的另一种解决方案:
- 转到仪表板→设置→媒体,然后取消选中"将我的上载整理到基于月和年的文件夹中".因此,现在您上传的每个文件都将放置在" wp-content \ uploads"中(可选步骤,但建议您轻松找到新的上传文件以移至另一个文件夹).
- 安装"媒体文件管理器"插件.
- 转到仪表板→媒体→媒体文件管理器.
在这里您可以创建所有想要整理内容的文件夹.这两个分开的窗口仅用于在不同文件夹之间移动内容,您可以在一侧创建一个文件夹,然后在两个文件夹中都将刷新该文件夹.使用两侧导航到内容的当前文件夹和目的地文件夹,然后使用向左或向右箭头将其移动,很简单!
Notice DB也已更新,因此,例如,如果将当前正在使用的图像移动到网络中的其他位置,则必须从媒体库中重新选择该图像,否则它将不会出现在您的网络中.>
希望您会发现此信息有用.问候!
Another solution to this problem:
- Go to Dashboard → Settings → Media and uncheck "Organize my uploads into month- and year-based folders". So now every file you upload will be placed in "wp-content\uploads" [optional step, but recomended to find easily new uploads for moving to another folder].
- Install "Media File Manager" plugin.
- Go to Dashboard → Media → Media File Manager.
Here you can create all folders you wish to organize your contents. The two divided window is just for moving content between different folders, you create a folder in one side and it'll be refreshed in both. Use two sides to navigate to current and destiny folders of your content, then use left or right arrow to move it, it's easy!
Notice DB is updated also, so if for example you move an image you're currently using elsewhere in your web, you'll have to reselect this image from Media Library or it won't appear in your web.
Hope you'll find this info useful. Regards!
-
- 2017-02-01
针对偶尔需要将媒体文件上载到特定年份/月份的目录的偶尔情况的"快速破解"解决方案:
- 添加一个临时草稿帖子(不保存)
- 将发布日期更改为所需的年月,然后单击[保存草稿]
- 该帖子中的[添加媒体]-WordPress会将其保存到该年/月的文件夹中.
- 返回帖子并删除帖子草稿.
只要您不发布,该帖子就永远不会出现在您的网站或提要中,但媒体文件将保留在该目录中.
我很高兴这是针对上述问题的一个非常具体的案例,但是当添加到需要保持在一起的一组下载内容时,它对我有帮助.如果您确实希望将它们放在时间顺序树之外,那就不好了.
A 'quick hack' solution for the occasional situation where you want to upload a media file to the directory for a particular year/month in the past:
- add a temporary draft post (don't save)
- change the publishing date to the year and month you want and [Save Draft]
- [Add Media] in that post - WordPress will save it to the folder for that year/month.
- go back to Posts and delete the draft post.
As long as you didn't publish it, the post will never appear on your site, or in feeds etc. but the media file will be left in that directory.
I appreciate that this is for a very specific case of the question above, but it helped me, when adding to a set of downloads that needed to be kept together. No good if you actually wanted them outside the chronological tree.
-
- 2018-01-31
这是您要寻找的: Media Library Plus
我用了它就成功了. 这是使用方法指南.
This is what you are looking for: Media Library Plus
I used it and it did the trick. Here is the guide on how to use it.
-
- 2020-08-27
使用此" FileBird"免费插件 https://wordpress.org/plugins/filebird/,然后您将看到如何将文件上传到特定的文件夹,如下图所示.
Use this 'FileBird' free plugin https://wordpress.org/plugins/filebird/, and you will see how to upload files to a specific folder like this the image below.
-
- 2013-02-09
只需使用 http://wordpress.org/extend/plugins/nextgen-gallery/ Nextgen Gallery.您可以在此处上载图像组,用于显示图库,或在WP图像插入窗口中从中上载单个图像.
Just use http://wordpress.org/extend/plugins/nextgen-gallery/ Nextgen Gallery. You can upload groups of images there, use it to display galleries, or upload a single image from there in the WP image insert window.
-
插件如何精确地应用于问题中提出的情况?How exactly the plugin applies to the situation asked in the Question?
- 1
- 2013-02-09
- brasofilo
-
是的,我看不到下一代画廊如何满足OP的要求.Yeah, I don't see how nextgen-gallery does what the OP wants.
- 0
- 2013-07-13
- Jason
-
这不能回答问题,它特定于NextGen中的画廊,而不是常规媒体上载.This doesn't answer the question, it's specific to galleries in NextGen, rather than general media uploads.
- 0
- 2013-08-07
- random_user_name
默认情况下,通过Wordpress仪表板上传的媒体会进入当前日期确定的文件夹中.例如:/wp-content/uploads/2011/09/.媒体上传后,我在Wordpress中看不到任何将文件位置更改为其他位置的选项.
我可以告诉Wordpress将媒体放置在单独的文件夹中吗?不是我所有的媒体.只是我专门选择的媒体.