Drupal: upload CCK Images before saving the node - drupal

I've defined a content-type with some text areas and a CCK Upload File (image) field.
When i create a new node, if I upload the image before saving the node, it keeps uploading endlessly.
If I save the node, I re-open it and I upload the image it works in few seconds.
Am I forced to save the nodes before to upload images with CCK Upload Fields in Drupal ?
thanks

Hmm, I've had similar troubles. I would recommend looking at your apache server logs and your php logs to see if you can find anything going wrong. Also try it across different browsers and see if that helps.

I'm not familiar with the CCK Upload File, but the most popular (and by far the most supported and actively developed) way to upload using CCK is FileField (and its image-based counterpart, ImageField). Both don't exhibit the problem you describe: you can absolutely upload during node creation.

Related

Wp-Stateless + Google Cloud Storage view but not download files

I want to use Google Cloud Storage (GCS) to share my videos on my WordPress LMS, for that, I am using WP-Stateless which during setup which requires to provide public access to my GCS bucket.
Now my issue is that I want my users to be able to view the media files but not be able to download them.
Is there any way to do that?
There is no way to prevent users from downloading images from your website. In fact when users view your images in a browser, they are downloaded to your browser cache. You can take some measures like:
Prevent right click
Disable hotlinking
Add a watermark
Add a copyright notice etc etc...
But realistically there is not much you can do. Everything you do to protect your images can be bypassed. You could also use a plugin to convert your images to webp format. Most people do not like downloading webp. They prefer jpg and png :)

Is it possible to develop a wordpress plugin that can upload and display a HTML5 app?

I have a desktop app that generates small HTML apps (a zipped folder with a single HTML page, a bunch of scripts with WebGL stuff and a bunch of media files).
Now I would like to make this HTML app easy to deploy to wordpress through a plugin that would:
Let the user upload the zip file from his hard drive
Unzip the contents and store them somewhere
Create a page that displays the HTML app
I'm not looking for actual code yet, just to know that this is possible and that it doesn't violate some constraint. Of course, pointers to information on how to achieve this are welcome.
Thanks for any help
It's hard to give pointers since it's a really broad question, but as for your plugin requirements: all is possible via php and thus, all is possible in a WP plugin.

Uploading unpermmited filetypes for virtual products on woocommerce

I would like to sell an eBook on my website. I'm using WordPress and the shop uses woo commerce, which I just switched over to.
The problem is, the eBook comes in a folder, which is not so simple to upload and sell. If I upload an .exe file, I get the message "Sorry, this file type is not permitted for security reasons" and there are certain files in the eBook folder which generate the same error.
I can use WinRAR or similar to compress it and then upload it that way, but I can't assume my users will have the technical ability to know what to do with it once downloaded.
The alternatives I came up with:
I have an install (.exe) file which is easy to download and use - it simply extracts everything and leaves shortcuts.
Ideally I would like to upload the entire folder and have the user be able to download the whole thing at once but, even if I could upload it, it doesn't seem possible to select an entire folder but only individual files - I would be really grateful if someone knew of a way to do this!
I'm yet to find a workable solution so any help would be much appreciated.
Edit: Should have added this is for interactive eBooks, not a simple pdf, unfortunately.
You are hitting WordPress' internal restrictions on file / mime types for adding anything to their Media Library.
This plugin should allow you to add .exe as a valid mime type.
https://wordpress.org/plugins/enhanced-media-library/
More details from the WordPress forum:
The underlying WordPress function called get_allowed_mime_types is used which is filterable and can be customized based on your needs via the WordPress provided filter named upload_mimes which is documented here: https://codex.wordpress.org/Plugin_API/Filter_Reference/upload_mimes
Thanks, WilltheWebMechanic. Your post helped me fix the issue without reverting to an older version of Woocommerce.
If anyone else is wary of the functions.php file like I am, you can use a plugin for it.
This is the one I used, and it seems nice and stable. Plus, it’s compatible with Woocommerce, which is why I chose it: https://wordpress.org/plugins/enhanced-media-library/
Once it’s installed, you can just add your file type to the ‘Mime’ section of the plugin.
I just added the file types I needed (epub and mobi). I hit save and my products are all working again.

IMCE module to load images from local hard disk

I'm using Drupal as my content-management system. I installed the IMCE module to include images on my site. This works fine, but I can only choose the images from the server, which means I have to copy them on the server and can then choose them. But I would like to choose them from my local hard drive.
Does anyone know if it is possible to do that with that module, or do I need another one?
Right. IMCE provides an upload button (See linked image, top left. I tried to embed it in my post, but the system here won't allow me to add images yet).
But by default, only User-1 has access to it and you'll have to create and associate profiles with roles to allow actions such as uploading of files. If you haven't done so, this is configured on:
admin/settings/imce (Drupal 6), or
admin/config/media/imce (Drupal 7)
So if you aren't logged in as User-1 and don't see the upload button, it's likely a configuration step you are missing.
I wrote an article recently which goes pretty in-depth about use of the IMCE module and gets into configuration. It also covers the workflow for adding images to WYSIWYG content editors, and is written with Drupal 7 in mind, but the IMCE-relevant stuff is mostly the same between Drupal 6 and 7. You may also want to use the IMCE_Mkdir module, which allows users with appropriate permission (added to the IMCE configuration for each profile) to create new sub-directories, which can help keep your images or other files better organized.
You can read my relevant article on the Cocomore Drupal blog: Configuring and adding images to Drupal 7 content with Wysiwyg, IMCE and Lightbox2
Hope that helps.
Click the 'upload' button in IMCE...that will allow you to upload images to the server using the UI, then you can choose them. There's no other way of doing this as obviously it's a website...if you want files from your local machine on the server you'll have to transfer them there. This is what IMCE's 'upload' button is for.
You might also want to check out the IMCE WYSIWYG Bridge module if you're using WYSIWYG, it provides a nice easy way to upload images into WYSIWYG if you're using that module.
Just a tip that always bother using drupal. If you don't see some config options after installing a new module (it was my case for this threat), you must clean caches , in D7 /admin/config/development/performance

Weird Issues with WPMU I Can't Figure Out

I know I should post this on the WPMU forum, but no one writes me back and I'm just trying to find a larger audience hoping you have run into this issue as well.
I have built a WPMU site for a client, and I am able to upload media into the Media Library and within a Post or Page perfectly. I thought my job was finished, yet the client can't upload any media at all. I'm located in Kentucky, they are located in New England (if that even matters). I had the client record their process of uploading as I thought they were simply not following my instructions for uploading, yet they are doing everything correctly.
When uploading a file it goes through the process of allowing them to select a file and it says it uploads it, yet when it is finished uploading nothing is in the Media Library or in the Post.
Video of the client trying to upload in Media Manager (http://www.screencast.com/users/CatherineWeber/folders/Jing/media/945d33fa-a752-45fd-9bc1-f76fc5a1814a)
Video of the client trying to upload within a Post (http://www.screencast.com/users/CatherineWeber/folders/Jing/media/b5c60e25-f0b5-40c0-a820-c2fc9eb00906)
Asking the client to disable Flash Uploader didn't work :(
Yet, I can login to the WPMU site, access their blog's backend and can easily upload a ton of files. I am so lost at to what the issue is here. I am running version 2.8.4a, and will try to upgrade to latest release hoping this will fix things.
Are you using same blog and same username to login ?
Ask the client what media exactly he is trying to upload. PHP server has "Maximum allowed size for uploaded files"(upload_max_filesize) option. So if this limit is set to 2M(M stands for MB in php.ini), but the client is trying to upload something bigger...it can't be uploaded.
Also check the filetype...I'm not sure, but I think wordpress has such a filter.
If even this doesn't help, ask the client to record itself what exactly is doing on his screen. There could be errors returned, or any other little missed, by him things ;)

Resources