Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

User defined folder for file upload #14

Merged
merged 1 commit into from Mar 14, 2016

Conversation

darilek
Copy link
Contributor

@darilek darilek commented Mar 14, 2016

User defined folder for file upload. Useful for using AjaxFileUpload in cluster enviroment

MikhailTymchukDX added a commit that referenced this pull request Mar 14, 2016
User defined folder for file upload
@MikhailTymchukDX MikhailTymchukDX merged commit f87b0d5 into DevExpress:master Mar 14, 2016
@AlekseyMartynov
Copy link
Contributor

@MikhailTymchukDX
The use of a mutable static property is potentially unsafe. OK if it's initialized to a constant and never changed, but we cannot guarantee that. Let's change to HttpContext.Current.Items.

@darilek
Copy link
Contributor Author

darilek commented Mar 15, 2016

It was meant as initialization using constants at application startup. But content of HttpContext.Current.Items must be refreshed on every request. Would be HttpContext.Current.Application the right place for storing root path?

@AlekseyMartynov
Copy link
Contributor

Hi @darilek
I see. For static configuration, a key in web.config is perfect.
What do you think?

@darilek
Copy link
Contributor Author

darilek commented Mar 15, 2016

Yes web.config is good place. So by default temp dir will be used with possibility to override via web.config settings. IMHO special new child element for this should be created. What do you think?

@AlekseyMartynov
Copy link
Contributor

@darilek
Sounds good!
We're moving the discussion to #22

@IlyaKhD
Copy link
Contributor

IlyaKhD commented Mar 23, 2016

Hi @darilek,
Would you please clarify, does this problem occur when you are using the SaveAs method on the OnUploadComplete?

The expected AjaxFileUpload usage is:

  1. Download a file to the TEMP dir
  2. When download completed copy this file to the required destination.

Thus one shouldn't rely on the TEMP dir - it's just a intermediate storage to avoid accessing the file before download completed.

P.S. Sorry for using the closed thread, but it seems to be the most appropriate.

@AlekseyMartynov
Copy link
Contributor

@IlyaKhD
Medium Trust? (see #29)

@IlyaKhD
Copy link
Contributor

IlyaKhD commented Mar 24, 2016

@AlekseyMartynov
I mean that AjaxFileUpload TEMP dir is an internal thing and shouldn't be worked with directly.
As for Medium Trust - I think this problem should be solved globally, like 'fix all GetTempPath() calls'.

@darilek
Copy link
Contributor Author

darilek commented Mar 24, 2016

I wrote the reason for this property in the first post - using AjaxFileUpload in cluster enviroment (web farm). You need shared location to assemble file chunks from all servers in cluster. From client side, you don't know which server in cluster processes incoming AJAX request (containing file chunk)

@IlyaKhD
Copy link
Contributor

IlyaKhD commented Mar 24, 2016

And you farm is working in non sticky mode, right?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants