How to change upload directory in Vtiger - vtiger

When user upload image in Vtiger (Producte module) created automatic path. Now image path has the form /storage/2016/May/week2/26540_IMG_NAME.png. I need chenge it to /storage/product/IMG_NAME.png. How I can do it?
Vtiger version 6.3.0

You have to change in \vtlib\Vtiger\Functions.php to change the upload directory path.
-- Make sure that the directory you are created having read write permissions
static function initStorageFileDirectory() {
//change the directory path by modifying the $filepath
}
Hope it will help you. Thank you!

Related

Sitecore advanced upload option is missing from admin panel

I was trying to upload an image using Sitecore [Version 6.5] media library to my existing sitecore website. I see the Advance Upload Files option is completly missing. Later, I tried to install a default sitecore instance and I see the Advanced Upload option is there. But it is completely missing to the existing sitecore website.
Here, is the snapshot of my site where the Advanced upload option is completely missing:
And here is the snapshot of my default sitecore site where the Advanced upload option is there:
To fix this, I tried to change couple of configuration files. But still the same issue. The Advanced upload files option is completely missing. Did you face the same type of issue or if you know how to fix this issue, can you please share your thoughts. Or if I need to change any of the configuration files, then can you share your thoughts about that change of any of the configuration file?
Thanks
Upload files (Advanced) button is hidden in 2 cases:
Folder does not use Media Folder template. Just check your folders - maybe they use standard Folder template instead of Media Folder.
Upload.Classic setting is set to false. Open /sitecore/admin/showconfig.aspx and look for Upload.Classic value. When it's set to true, Sitecore uses flash upload instead.
If none of above is the case, maybe you have some custom code which hides Upload files (Advanced) button from you editors.

How to change default location of OpenCart file manager?

After upgrading a website from opencart 1.5 to 2.3 I can't see the old uploaded images in file manager. My files are in /images/data/... while the file manager loads on /images/catalog/ and doesn't let me access any files beyond this folder. Is there a way to change the default location for file manager?
Luckily the older products still have the right links to their images, but since any new will have to be stored under /catalog directory, I will not be able to upload any new ones to already well made file structure.
admin/config.php will give you the directory of your image files, you can also change it to point at the correct location.

Pillow upload path in pythonanewhere?

I'm using pythonanywhere.com and would like to attach images for my posts. When installed my model, I have a folder path for downloads like this
image = models.ImageField(upload_to="/static/uploads/",
but when I attach the photo I receive a message
The joined path (/static/uploads/1.jpg) is located outside of the base path component (/home/farmville)
if I specify the full path
/home/username/project/static/uploads/
it's working, but in the template file this path does not work, the image is not :(
How can it can be solved?
The two paths are different things, so using the same path doesn't make sense. The upload_to path is a path to a directory on the server where the image should be uploaded. The path in the template is probably a URL path (it's hard to tell without the actual template) and so it needs to point to where you're serving the uploads from.

Mangento Unable to create directory while uploading product image

Am very new to magento, created one site using magento. All the functionality are working fine in localhost. When am upload that code into online(server), i got one issue. except that all functionality are working fine.
While am uploading an image i got the issue "Unable to create directory".
Images are uploading to tmp path but not moving to target path. Because when am press the button 'upload files', I can able to see the upload percentages. That is why am thing the files are not moving due to dynamic directory creation fails.
I have tried lot but i can't able to make it as work.
I had tried the following solution,
1. Changed the media file permission to 777.
2. Created one tmp directory under /var/ directory and assigned manually in as tmp directory by change the line 91 of lib/Zend/Cache/Backend/File.php ('cache_dir' => null to 'cache_dir' => 'var/tmp').
3. Changed the php.ini file under the magento root directory.
Newly added lines are,
magic_quotes_gpc = off
short_open_tag = on
extension=pdo.so
extension=pdo_mysql.so
4. Checked whether GD library installed or not. It was installed.
5. Changed scope attribute in Magento admin panel -> Catalog -> Attributes -> Manage attributes. After this you should find image, small_image & thumbnail attributes. Then am changed all these attributes scope to Global.
Many thanks in advance. Please share your thoughts. Feel free to post your comment also.
Finally I got solution at 22-Aug-2014.
Problem is PHP version issue, megento need php 5.2.13 but my server contains php 5.2.12
After updated php version, image upload working fine.

Is there a specific solution for file permission issues?

I am doing a website(Joomla) and I am using admiror gallery. Everything is working fine while I was working in the localhost but now that I migrated it to a live server, I am having problems in uploading images in the gallery.
The first is when I create a new folder to contain my new images. When I create it and try to upload a zip file, it's taking forever to load only to find out that it's not even uploading at all. When I looked into it, the reason is when a new folder is created, the permission is 755 by default, thus, making changes on the folder is not allowed. I need to change the file permission to 777 and now I am able to upload my images but there is another problem that occurs. The thumbnails in the backend are showing broken images. This is because the 'thumbs' directory in home/administrator/components/com_admirorgallery/assets/thumbs/ is again set to 755. I tried to change it to 777 and reupload the images again. The images gets uploaded but the problem with the thumbnails is still there. I checked again the folder and the permission is reverted back to 755.
Is there something I can do with this? Any suggestion is appreciated. Thanks in advance.
You should check the files and folder owner, not only permission.
PHP user (Joomla) is the creator of thumb folder, thus it should be able to create files in that directory. Also, it is not safe to have 777 on live site.
Shambhala made a suggestion that should help. Also you should use AkeebaBackup when migrating from local to live server, I never had problems with it.