Hey friends I came up with the question today that I have a window where I am adding users selected folder in my app from NSOpenSavePanel. I was accessing all the files and folders properly but as soon as I quit my app I am not able to open those folder because when I am giving path to open those files or folders it is showing pop up You don't have permission to access this folder
I saved BookMark data to my app's preferences and now it is working fine.
The question was ; What exactly is happening ?
Looking forward to you.
The reason for this is the App Sandbox. The idea is that the user controls to what files an app has access.
For a one time access everything is handled for you. But if you want keep access across launches of your app you need to store and restore a bookmark.
You find all details about this in: Security-Scoped Bookmarks and Persistent Resource Access
Related
So I have a sandboxed app, which allows users to drag and drop files from Finder onto a project window.
I would like to use these files from their existing location, ie by reference, rather than copy them to a project folder, as the user may have a large existing library of files.
While the app is running, these files are fully available for reading. (They are .mp4 and I can preview them in an AVPlayer view).
When I save the app's project, I include the NSURL of the files.
When the app restarts and re-opens the project later, the files are not available and Console shows deny(1) file-read-data - which means the file is not reaable. (Access denied).
Presumably this is because the files are out-side of the sandbox. Yet, they were readable when dropped onto the app. Looks to me like the app sees them as "user selected" when first dropped on, and so they are readable, but on the next session because they are loaded from NSCoder as NSURLs they are not considered user-selected and therefore become unaccessible!
My app currently has these entitlements:
com.apple.security.files.user-selected.read-only
com.apple.security.files.user-selected.read-write
Is there soemthing I need to do with entitlements etc to allow the re-loading of files later?
When the file is first dropped you need to create and save a security scoped bookmark which you can the use on a subsequent app launch to regain access to the file. Read Security-Scoped Bookmarks and Persistent Resource Access in Apple's App Sandbox in Depth.
I want to save file in my local system.
This purpose i need to choose directory where the file want to save.
I want the choosing folder path.
I didn't find any web controls please help me. windows from control is not working in web forms.
I have tied using FolderBrowserDialog control but it is not working in MVC
There is no such control (except using ActiveX Control or Java Applets), so don't waste your time to look for it and you can not get any folder path(on client machine) with JavaScript due to security reasons.
Why don't you just allow user to download the file and user will select the folder where he wants that file to be saved or else it will get saved in default folder of browser.
Hope it helps, thanks.
I have a bunch of files on my onedrive account synced with my laptop (windows 8.1) and Surface RT (Windows 8.1).
Now, if I add any files or folders (by web upload or by copying to onedrive folders on my laptop/Surface) all these files disappear from their location and I can find them in the Recycle Bin.
How can I troubleshoot this behavior?
Thanks in advance!
Try the feedback link from the options gear in the onedrive web page. They treat data loss issues very seriously and usually respond quickly.
I realize this is an old post, but I just ran across this (or a similar) issue and thought I'd share something that worked for me.
Check the following to see if the folders you've added to OneDrive are selected to be included in the sync:
Right-click the OneDrive icon in the taskbar and choose Settings
Go to the Account tab and click the Choose folders button
Select the checkbox for the folders you'd like to sync/save
NOTE: If you are saving files directly in the OneDrive directory (C:\Users\YourName\OneDrive\) instead of in a folder (C:\Users\YourName\OneDrive\MyFolder\), make sure to check the box for the "Files not in a folder" option.
When a Dropbox user connects to a single folder Dropbox app (let's call it Foo), Dropbox creates a new app folder like so:
Dropbox > Apps > Foo
If the user changes the name of folder Foo to something else, will Foo (the app) still be able to access its contents?
I haven't been able to find documentation about what happens when a user renames an app folder. From my own testing, everything seems to still work but I'd like confirmation.
Yes, if the user renames the app folder, the app will continue to work and be able to access the contents of the app folder. The app won't even know about the change, and doesn't need to do anything special to handle it. (This is much like how a user can rename a shared folder: https://www.dropbox.com/help/64 )
I am wondering if there is a way in objective c to have my iPad app copy a file in it's documents folder to another app's documents folder and have that app open the file for editing and finally copy the file back to my documents folder. Or better yet, can I have another app open a file from my documents folder, edit the file, and save it back to my documents folder?
So far I know I can have another app open a file in my documents folder but the app that I'm handing the document off to seems to be making a local copy and editing the copy. I also know that each app's document folder is a shared folder that users can drag and drop stuff from itunes but I'm not sure if the same can be done in code.
I am pretty sure what you are trying to do is impossible. iOS applications are "sandboxed" which means that each app has its own documents directory. No application has access to the file system outside its own "sandbox" i.e. outside its own local documents directory.
For more on the iOS application sandbox, Read here.
Though a sandbox exists, I found a way to work around it (it's a trick being used by other File Manager apps like GoAruna). I would first register my app as an app that can open the type of files that I plan to work with. Then I use the Open In functionality to have my users open up my apps local documents in the second app, an app like iAnnotate. Then, because my app is registered as an app that can open the current file type, I can instruct my users to use Open In from iAnnotate to move the modified document back to my app. Sorry but I could not accept "no" as an answer. If anyone is interested in this approach, go here
If your iPad is jail broken, try this:
On the app iFile, type in the document name in the search box located at the top. Once you find the document, click on it and options would be showed to you. From here you can choose the app you want to open the file with.
Hope this helps.