Slack showing "File was not found" after sending attachment through web app - c#

I am using this NuGet package. When I send the messages to slack it shows that the file i specified is attached. But if you click on the file, either to view or download, it states that there is no file.
File when received
File after it was clicked
I have tried attaching all different types of files and file types and they all show that there is an attachment, but as soon as I click on any of them they all state that the file was not found.

Related

Put file somewhere it can be attached to an email in Xamarin targeting Android API 29

I am supporting an Android app written in Xamarin which has a feature where the user can email logs and SQLite db file to a support email address. It does this by zipping up the files and then copying the ZIP to the public Downloads folder, then attaching them to an email.
It uses the Download folder so that other apps have permission to access the files, and I can see them if I connect to my PC with a USB cable.
This has worked fine until now - to deploy an update to the Play Store I now have to target API 29 and this no longer works. The function to move the ZIP file to the Download folder fails.
I use the following method to get the path to the new file in the download folder:
var path = Path.Combine(Android.OS.Environment.GetExternalStoragePublicDirectory(Android.OS.Environment.DirectoryDownloads).AbsolutePath, filepath);
although VS is showing this method as obsolete:"deprecated"
When I try and move the ZIP file to it, I get
System.UnauthorizedAccessException: Access to the path "/storage/emulated/0/Download/logs.zip" is denied.
I have added
android:requestLegacyExternalStorage="true"
to my manifest, which has made no difference at all.
If I switch back to targeting API 28, all works fine.
Is there anywhere at all I could put the file to allow the user's default email app to read it as an attachment?
If you have requested for the read and write runtime permissions. Check the suggestions is the link below. Android 9.+ API 29: /storage/emulated/0/Pictures/myPic.png open failed: EACCES (Permission Denied)
And use the code below to replace the deprecated method.
var path = Path.Combine(GetExternalFilesDir(Android.OS.Environment.DirectoryDownloads).AbsolutePath, filepath);

could not load 'CKFinder.Connector.Connec'

I have them in Ckfinder and Ckeditor folders. When I click on the image icon to insert an image on the editor, then click "Browse Server", it opens the popup with the "file browser" but I get an error message giving a Server response status 500 parse error message could not load type 'CKFinder.Connector.Connector'
[![enter image description here][1]][1]
From the ckeditor forum, it says that you need to make sure the dll is in the bin folder.
Make sure that CKFinder.dll file is located straight inside of "bin" folder.
By default CKFinder's bin folder contains subfolders "Release" and "Debug".
As stated here, if you add the CKFinder.dll in your references, it should solve the problem, without you having to manually copy it.

Change IE default File Browsing Folder

When you need to upload a file using IE, a file browsing dialog will open and let you choose a file.
In future whenever you try to upload a file, previously selected file's location will be displayed as first folder in file browsing dialog.
After some researches I find out opened file's information will save in this location of registry:
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\ComDlg32\OpenSavePidlMRU
I need to Change IE default File Browsing Folder from code.

Need Help reading xml files from microsoft onedrive app folder

I am developing a windows 8 app in which i am trying to read xml files from Microsoft onedrive folder. The xml files get synced from onedrive to a particular folder. But when i an trying to read these synced xml files using StorgeFile.OpenAsync(FileAccess.Read) i get the following exception:
System.Unauthorized Exception occured in mscorlib.dll
HRESULT:0X80070005(E_ACCESSDENIED)
I am able to copy these synced files to some other location and also when i copy these files to some other location and paste it back to OneDrive folder i am able to read them
Check to see if the files are blocked. Right click on file and click on properties. If you see an Unblock button press it. If you have multiple files that are blocked, you can use the following PowerShell script:
Get-ChildItem c:\users\tech360\OneDrive - Tech360\Xml | Unblock-File

How to launch a ClickOnce application with an application downloaded from a browser?

What I want to do
When clicking the download file link on our web application, the browser will prompt the user to save or open a file. When selecting open the file will open in an installed application.
What I have so far
I have an ASP.NET MVC application which returns the file like so:
return File(bytes, "application/octet-stream", "file.rod");
I have created a ClickOnce installer with a file association for the application and when prompted to save the file the file appears with the registered file association icon and when double clicked the application launches as expected.
However, when you select open the application doesn't launch, which is weird because it starts correctly when the file is opened from the file system (explorer.exe). My current thinking is that the problem either lies in the way I've set up the file association or how I'm sending the data from the browser (perhaps the content-type?).
Here's the file association registration in the manifest file:
<fileAssociation xmlns="urn:schemas-microsoft-com:clickonce.v1"
extension=".rod"
description="Lollipops and Ice Cream"
progid="Rod.Document"
defaultIcon="risque.ico" />
What have I missed? What should I try next?
One more thing: I know it's possible to pass query parameters to a ClickOnce installer. This is something I'm also considering trying.
I think your content type needs to be application/x-ms-application on the return File() line; otherwise, IE will not recognize that it needs to launch it as an application. For Firefox, I haven't tried it in the most recent version, but I remember needing a ClickOnce plugin for it to work correctly.

Categories

Resources