Box.Net API v2.0 Moving File on Service Action - box-api

Building a workflow that allows a file to be dynamically moved via user input (renames, the whole works). Using the Service Action, a web service will rename and move the file based on user input fields and some other behind the scenes processing. However, once the service runs and the window closes, the file is move but the user experience goes bad. The file keeps refreshing in the preview pane, redirects back to the root, and nothing works right until you navigate away.
The ideal solution would be the for the file to be moved and the user moved to the next file in the folder (or at minimum kept in the folder) as we're looking at a "processing" folder.
Is there any ideal best practice? Do I simply just need to copy the file instead of move and then run a delete routine after-the-fact?

It may be best for you to contact Box via email at API at Box dot com to explain better what your application is trying to accomplish. Generally describing the business case helps us resolve questions like this more quickly.

Related

How to disable parent directory access in web file browsing without web server

I am writing a command line application that produces an index.html with links to other generated HTML files, but also some links to filesystem subdirectories. Here is an example of such a link:
Invoices
The intention for sharing this content is for the user to zip up the directory tree and send it to other parties for review. However, some users might think to use ngrok, or use screen sharing, to share their web browser to allow other people to access their local system. With ngrok they would be running a web server and might be able to configure the web server to protect against this, but with screen sharing that would not be possible. (Consider the case where a user might leave their web browser open to the remote user and step away, not realizing that the remote user can now examine their entire filesystem.)
The problem is the "Parent Directory" links. Using those links, the others could navigate above the intended directory root and navigate their entire filesystem. Here is an image to illustrate:
The directories linked to can have arbitrary numbers and levels of subdirectories, so hard-coding links on custom pages would probably be prohibitively complicated.
There is no web server involved here; the files are displayed by just opening index.html in a web browser, so .htaccess is not a solution. Also, I don't want to disable navigation, I only want to limit its upper bound.
Is there a way to prevent this access?
If there is no web server involved at all, there is no way to prevent that behaviour.
Edit:
You could of course write a browser plugin that limits the access to the parent directory using JavaScript. But every client would have to install that plugin.

How to pre-authorize URL to use microphone in Electron (or Chrome)?

I need to pre-authorize a URL to use microphone. It's an internal system accessed via Electron (v4.1.3).
Pre-authorization is required as users use it in some sort of Linux thin client. That is, each day the system bootstrap from an image and then profiles,etc are created. Therefore users would have to click Yes on the access prompt every single day, and if hitting NO just causing headaches to provide them steps to fix as the system requires mic/audio.
I've checked Google Chrome, and apparently it writes the permission on {chrome_profile_dir}\Default\Preferences file.
But on Electron, could not see same behavior on AppData\Roaming\{app.name}\Preferences file. So, to be honest I don't even know where Electron is storing the permission. I deleted the aforementioned folder, but it doesn't ask permission anymore.
Is there a way, like writing to a preference file, I could pre-authorize this? If yes, would write that to the image file.
You could use permission request handlers in electron.
https://electronjs.org/docs/api/session#sessetpermissionrequesthandlerhandler

Get downloads & file browsing requests from HTMLFrame

I am able to load and display files using the HTMLLoader class. http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/html/HTMLLoader.html
Problem is, when a user navigates to a download link or an upload button, nothing happens. I heard somewhere that any downloads get sent over to the user's main document folder. Anyway to intercept this and get some details? Someone in my browsing history suggested to somehow get it using the Socket class to fetch it's data and control where it would go using the File class. I couldn't make out the demonstration.
Bonus question...what properties do I have to set to make Google understand that this browser is not a bot? I get this in plain text when trying to navgiate to http://www.google.com . It's other services work completely fine though.
Google
Sorry...
We're sorry...
... but your computer or network may be sending automated queries. To protect our users, we can't process your request right now.

How dynamic is the Box /search API?

I'm using the Box search API to try to locate files on my Box account.
I'm finding that when I move files around, even though those files are on my account on the server, when I search for them, they are not found. They were found in the original location.
Should the /search API reflect the current state of my account? Or is there some sort of caching.
This seems to especially happen with files moved to subfolders.
There is a small delay where Box has to reindex your changed files, so updates won't be seen immediately in real-time.

How to Browse Server files using Flex4

I need to show the server uploaded files in flex 4.5 for a web application to manage the uploaded files like upload, delete and open for preview.
Can anyone help me How to list the sever side files in Flex action script3.0?
You can't just let Flash player browse your server files. But you could create a workaround.
Make a script on the server which will give you the list of files located at the path you're looking for. Through basic POST you can ask for a list of files for a directory. Then you can display it in your flash side. But remember every actual action that happens to your files MUST happen on the serverside. Also BEWARE such things, because it's really easy to look up network requests that are made in browser, so you may end up with all of your files deleted one day. So make sure you implement some security stuff.