navimaps4u 0 Posted January 12, 2020 Share Posted January 12, 2020 I want to upload some files for digital downloads but I am not sure exactly where to upload the files to. as I see this message Files uploaded to the files/public folder can be accessed directly via a browser. All others are protected with intent to be sold as digital products. Do I need to create another folder in the public folder or ??? Thanks Quote Link to post Share on other sites
bsmither 1,463 Posted January 12, 2020 Share Posted January 12, 2020 In admin, Downloads, you will see a /public/ sub-folder. This folder has an .htaccess file that overrides the restrictions put in place by the .htaccess file found in the /files/ folder. Those restrictions in the /files/ folder and all sub-folders (except for the /public/ sub-folder) below it tells the web browser that direct access is 403 Forbidden. Only under CubeCart's control can these files be delivered to the customer. On the Downloads admin page, Upload tab, the admin will use the Browse button to locate a file to upload. Once uploaded, CubeCart will determine certain details about the file and log them in the database. When adding/editing a product, on the Digital tab is where the admin specifies that this file is associated with this product. (As of CC628, there can be only one file associated with a product, but that file can be associated with many products.) Quote Link to post Share on other sites
navimaps4u 0 Posted January 13, 2020 Author Share Posted January 13, 2020 Thank you for your reply bsmither, But I am still a little confused, When I go to downloads I see only a folder called "PUBLIC" can't see any sub folder. Do I upload digital files into the "Folder called public" or leave them outside the "Public Folder" (in the file folder) or create a sub Folder inside the "Public Folder" Please advise, Thanks very much. Quote Link to post Share on other sites
bsmither 1,463 Posted January 13, 2020 Share Posted January 13, 2020 In admin, Downloads, there is a Create Filder tab. On this stab, you can create a sub-folder within the main (/files/) folder. For example, Repository1. After saving, you click on this new folder name (Repository1) and on the next page shown, CubeCart will display any files uploaded here, if any. While here, if you click the Create Folder tab and enter and Save a sub-folder name, it will be placed within the current folder (Repository1). For example, Repository1A. After saving, you click on this new folder name (Repository1A) and on the next page shown, CubeCart will display any files uploaded here, if any. The current directory can be discerned by looking at the breadcrumbs above the page tabs. For example, the breadcrumbs may say: Dashboard > FileManager > RepositoryA > RepositoryA1 You can upload files to any current directory. The main directory is CubeCart's /files/ which corresponds to the breadcrumb sequence: Dashboard > FileManager Upload any file you intend to associate with a costly digital product to any folder that is not the public folder or any folder within it. Quote Link to post Share on other sites
navimaps4u 0 Posted January 13, 2020 Author Share Posted January 13, 2020 Great now I get it. Thanks very much for your detailed explanation. Kind Regards Peter Quote Link to post Share on other sites
navimaps4u 0 Posted January 13, 2020 Author Share Posted January 13, 2020 I am back! I tried to create a new folder as suggested but it won't let me, comes up with error saying "failed to create folder" file upload failed. Quote Link to post Share on other sites
bsmither 1,463 Posted January 13, 2020 Share Posted January 13, 2020 The code in CubeCart will have PHP use its function mkdir() to create the named directory within the current sub-directory. CubeCart will issue a "Failed to create folder" if PHP wasn't able to make that directory (the reason may be logged in PHP's error log), or the directory already exists. Are you trying to create a new sub-directory and upload a file at the same time? I haven't tried that. But I see no reason why the file failed to upload (unless it was too large) even if the sub-directory failed to be created. Quote Link to post Share on other sites
navimaps4u 0 Posted January 15, 2020 Author Share Posted January 15, 2020 All sorted now, the issue was for some reason I didn't have a "PUBLIC" folder in the file folder, once I created the public folder I was able to create a subfolder. Thanks once again for your detailed explanation to the issue. Cheers. Oh one more question, is there a way of uploading sample MP3 files that visitors to the site could listen to? Quote Link to post Share on other sites
bsmither 1,463 Posted January 15, 2020 Share Posted January 15, 2020 Yes. Here is a Cubecart-powered store that sells MP3s and has a player to hear samples: https://www.regionalkaraoke.com/ Quote Link to post Share on other sites
navimaps4u 0 Posted January 16, 2020 Author Share Posted January 16, 2020 Thanks I will check it out. Quote Link to post Share on other sites
Dawood Qureshi 0 Posted February 23 Share Posted February 23 i want to upload by general product catalog and my registration documents for my customers to see. These catalogs are not part of any specific item. just a general product catalog for everyone to download and read. Is Public directory the right place to upload, if so what URL will the customers go to, to access the uploaded catalogs? any help will be appreciated. Quote Link to post Share on other sites
bsmither 1,463 Posted February 23 Share Posted February 23 Correct. The /files/public/ allows for unrestricted access to files located there. You can then create a document (with a title) that will get listed in the set of Site Documents on the site. But, there is also, when creating this document, to specify a URL that CubeCart will use as the link to that document -- the catalogue, for example. Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.