How do I fix Directus error code 3 when downloading stored files - directus

I can store files to the specified storage location via the GUI. I can see the files are in the storage location.
When I try to download them using the GUI, I get this every time.
{"error":{"code":3,"message":"Unauthorized request","class":"Directus\\Exception\\UnauthorizedException","file":"\/var\/www\/directus\/src\/helpers\/app.php","line":287}}
When I try the links from the File library, I get the same error.
I found some old topics concerning a "_" project. I do not see any "_" entries in my project.php configuration.
Everyone has read permissions for the storage directory.
The rest of the system appears to run without error.

check the folder in the server and what is been set, the default should be, like
So then if you want to access the 300x300 the URL should be like:
domain.com/public/uploads/Directus/generated/w300,h300,fcrop,q80/file-name.jpg

Related

Marklogic - Adding a default rule set through admin console

I have defined a default ruleset through admin console. I have given the location of the ruleset as "C:/isParentOf.rules". However, it is not able to find this file. While running a query, it is complaining that
" The ruleset file cannot be found: C:/isParentOf.rules"
I have tried giving a relative path but it does not seem to work.
Can someone suggest what is the right way to specify the location of the ruleset and where ideally should it be kept (along with existing .rules files)
Thanks
Custom rulesets can be placed inside the MarkLogic installation dir under Config/, but I'd recommend uploading it to the schemas database. See also:
http://docs.marklogic.com/guide/semantics/inferencing#id_pgfId-924845
HTH!

Is there a possible way to open a file in visual basic by just putting the name of the drive?

Recently I made an application that has lots of PDF files in it and I made a setup for it using Inno Setup Compiler. In the setup, I allowed people to change where they want to install the app. For opening my PDF files, I used: system.diagnostics.process.start("My pdf.pdf")
My problem is that in the code above, I put drive "C:" and when my user changed the install directory to drive "D:" the pdf's did not work and the error showed that "Cannot find the specific file". My question is that is there a way to just put the name of "computer" or "a drive" in the code above, not the specific name of the pdf, and let the computer find the file itself?
You seem to be asking for an opposite of what you actually want to achieve.
I assume you are installing files with known names. What you do not know is the directory of the files.
From your description I assume that your actual code is like:
System.Diagnostics.Process.Start("C:\My pdf.pdf")
But when the user chooses a different location (directory) for your application, the above code with a hard-coded absolute path fails.
If your application installs to the same directory as the PDFs, just use a relative path (in this case just a file name without any path). It makes an operating system look to the current working directory, which will typically be an application directory.
System.Diagnostics.Process.Start("My pdf.pdf")
Or to make it more reliable, make it explicitly look to the application directory. For that use Application.StartupPath:
System.Diagnostics.Process.Start(
System.IO.Path.Combine(System.Windows.Forms.Application.StartupPath, "My pdf.pdf"))
See also Get program path in VB.NET?

Getting jQuery Error on using ezzeelfinder

Hi I am trying to use ezzeelfinder as file manager
I am getting the following error:
TypeError: jQuery(selector).elfinder is not a function
Query(selector).elfinder().elfinder("instance");
I am using the exact code from the Yii extension website. I do not know what is going wrong, I am using windows 7 with Apache (XAMPP)?
Continuing our discussion from previous ElFinder question let me try to explain more.
Can you look at what is inside elfinder.min.js file included from assets directory (you can use Firebug: Net tab > expand request of /assets/abcdef/elfinder.min.js > Response tab)? It wasn't a script (but some HTML with error) when I've reproduced a problem with such error. So if this JavaScript file is not included then there is no elfinder method extending jQuery and the error message you receive is fair.
Seems to me that this one is a permission issue. elfinder.min.js file cannot be published to assets directory for some reasons. Make sure that all permissions to elfinder.min.js file WITHIN extension's directory are granted. After granting the permissions to this file clean up assets directory and try again. At last, check whether the script has been really published to assets directory and has granted permissions there.
I don't know whether it will be helpful for you but I have an archive with demo files that can demonstrate extension's basic usage (made under Ubuntu though): http://ezze.org/yii/ezzeelfinderdemo.zip
Extract the contents of this archive to the root folder of Yii basic application created from command line using yiic script.

Moving Reports in Salesforce using Force.com IDE

I'm trying to mass move reports to different folders in salesforce using the Force.com IDE.
I've followed the instructions provided by SarathPM here:
http://success.salesforce.com/questionDetail?qId=a1X30000000IEOSEA4
I update my package.xml, move the corresponding files and then try to save to server.
However, I keep getting the following errors:
When deploying:
Save error: DeveloperName: This Report Unique Name already exists or has been previously used. Please choose a different name.
When saving to server:
Unable to save resource 'All_Leads.report' to server: IllegalArgumentException: Project and/or project package list cannot be null.
There must be a way to move reports in salesforce other than manually saving each report to a different folder. Thanks in advance.
EDIT:
I did a fresh checkout of the reports folder only.
package.xml before
<members>SampleConsultingDashboardReports</members>
<members>SampleConsultingDashboardReports/AvgEngagementLengthByPracticeArea</members
<members>Utility_Reports</members>
<members>Utility_Reports/X10_reports_Account_activities_last_7d</members>
package.xml after
<members>SampleConsultingDashboardReports</members>
<members>Utility_Reports</members>
<members>Utility_Reports/AvgEngagementLengthByPracticeArea</members>
<members>Utility_Reports/X10_reports_Account_activities_last_7d</members>
Save package.xml, move AvgEngagementLengthByPracticeArea.report to Utility_Reports. Refresh in Eclipse, I see the changes. I try to "Save to Server" and it tells me the "Project is not synchronized with the associated Salesforce organization." I bypass the message and try to save anyway, which is when the "Unable to save resource 'Utility Reports' to server" message shows up.
I tried Synchronizing everything with the server before making any changes. Still get the same error messages.
I can confirm that the method described by Sarath, when followed exactly, works. You'll need a more specific repro scenario. I'd suggest trying to move just a single report. Just to be clear, the steps are:
download a fresh copy of your reports metadata via Eclipse
manually edit the package.xml to change the folder of a report. (I think you need to make sure the folder exists on the server, and that you are referring to the developer name of it, e.g. Folder_A/My_report)
in the underlying file system, move that report to a folder of that name
in Eclipse, do a project refresh from the local file system (NOT the server)
in Eclipse, do a save to server
the report should move
If this also does not work, post your package.xml before and after, and the exact steps you followed.

Empty files on S3 prevent from downloading using s3cmd and s3sync

I am trying to setup a backup/restore using S3. The upload sync worked well using s3sync. However, next to each folder there is an empty file with matching name. I read somewhere that this is created to define the folder structure but I am not sure about that as it doesn't happen if I create a folder using a different method s3fox etc.
These empty files prevent me from restoring the directories/files. When I do s3cmd sync, I get an error message "can not make directory: File exists" as it first creates that empty file and that fails when trying to create the directory. Any ideas how I can solve this problem?