How to access files between two projects(Yii1 and Yii2)? - yii2-advanced-app

I wrote the same project(Front end and back end) using Yii1. Now, I changed the front end using Yii2 but back end are still running with Yii1(But,they are different projects) on same database. The problem is that Yii1 can't access files from Yii2 uploads folders when Yii2 uploads files.Because, back end (Admin site) want to look upload files and also want to update.Is it possible to access each other? How can I handle it? (Sorry for bad English)

Related

How to change the URL without change the FTP

So, i am facing a damn big problem...
I need to chage some URL's from a client, but i wanna know how to make that without have to change the files locations and pastes....
For Example:
Today i have this page: https://viahavok.com.br/cursos/3D/
The files of this page are located at public_html/cursos/3D/index.php
. I need to change the url to https://viahavok.com.br/cursos/Printing-3D and i wanna do it without have to create a folder named Printing-3D and transfer the files.... How i do it?

TFS 2013 build - uploading build output to servier via FTP

I'm hoping someone can help. I've started using the Community TFS Build Extensions, in particular the FTP activity. I followed the documentation here and got to grips with the it pretty easily. I'm encountering one major problem though.
My Web app has a basic enough structure:
I start by creating the FindMatchingFile activity which places the files in the drop location into an IEnumberable variable called FilesToFTP :
String.Format("{0}\**\*.*", BuildDetail.DropLocation)
When I iterate through the variable and print out the results, all seems correct:
G:\builds\Build.1203\CredentialManagement\bin\BusLogic.dll
G:\builds\Build.1203\CredentialManagement\css\style.css
G:\builds\Build.1203\CredentialManagement\AppError.aspx
......
G:\builds\Build.1203\CredentialManagement\Web.config
etc etc.
The problem is, when I pass that IEnumerable to the Ftp activity (converting it to a string array), it FTP uploads all the files on the server however it doesn't keep the directory structure of my Web app. It just piles all the output (dlls, aspx etc) into one directory. See the following two screenshots.
Is there any way I can use the FTP activity to upload all the output from the drop location recursively? I feel like I'm doing something simple wrong.
The FTP activity in TFS Build Extensions doesn't upload files recursively.
I think it would be a good value addition to the activity. Please create a request for the project and we will add in it. For now, you can go around it by calling the Ftp activity recursively for each directory and setting the RemoteDirectory for each.

How to present static file results that are generated at different time to client in play 2?

I am writing a web service using play 2.0 in scala.
After getting client's configuration parameters, then the web service will take a while to generate some files. (Note: some files can be short, some other files can take long).
I figured out how to get client's configurations and trigger my computation,
now I need to present the generated files to client side at the end of the session.
So questions are:
How to present the files to client?
I'm thinking about returning a static folder link to client, so that they can go into the folder to
see further what files are there, and so when clicking on the files, the details of the files can be shown, either jpg or text.
But how?
How to not to block client during the generation of the files?
For example, client can still click on the files that are available at that moment.
Then here comes the third question:
How to let the client side know that the long-time computation file is available and listed in the folder?
I'm pretty new to web application, thanks for any suggestion, advice, or little examples are greatly appreciated too!
I would create a web interface to show the created files to your clients and create a background job to for the long computation process. You can create a wait page where a javascript check if the file is created.

tinymce file browsers multiple file source

I am doing some updates to a site I have developed over the last few years. It has grown rather erratically (I tried to plan ahead, but with this site it has taken some odd turns).
Anyway, the site has a community blog ( blog.domain.com - used to be domainblog.com) ) and users with personal areas ( user1.domain.com, user2.domain.com, etc ).
The personal areas have standard page content that the user can use, or add snippets of text to partially customize. Now the owner wants the users to be able to create their own content.
Everything is done up to using a file browser.
I need a browser that will allow me to do the following:
the browser needs to be able to browse the common files at blog.domain.com/files and the user files at user_x.domain.com/files
the browser will also need to be able to differentiate between the two and generate the appropriate image url.
of course, the browser access to the user files will need to be dynamic and only show those files particular to the user (along with the common files)
I also need to be able to set a file size for images
the admin area is in a different directory than either the blog or the user subdomains.
general directory structure
--webdir--
|--client --
|--clientsite--
|--blog (blog.domain.com)
|--sites--
|--main site (domain.com)
|--admin (admin.domain.com)
|--users--
|--user1 (user1.domain.com)
|--user2 (user2.domain.com)
...etc.
I have tried several different browsers and using symlinks but the browsers don't seem to be able to follow them. I am also having trouble even setting them to use a directory that isn't the default.
what browser would you recommend? what would I need to customize to make it work.
TIA
ok, since I have not had any responses to this question, I guess I will have to do a work around and then see about writing a custom file browser down the road.

Uploading files different servers at once using a single html Form

Is there a way to make a form where it can simultaneously upload to several servers at once?
Currently in my web application, I am asking the users to type in some info + select a few files to upload.
Title, Description, Info, etc
File 0
File 1
File 2
File ...
On the backend, I'm using Pylons. Currently it accepts POST of (info + all files), processes the info and the first file (file 0), and uploads them again to Amazon S3. I only need to process info and the 'file 0' on my own server, the rest of the files I can pass through directly to S3 via a POST.
Is there a way to make a form where the info+file0 will be POST'ed to one server, and the rest of the files be POST'ed directly to S3?
While you could employ JavaScript trickery to make clicking on a submit button result in multiple POST requests to multiple servers, such a solution will almost certainly cause more problems than it solves. You should probably stick with your current method.
Check this and this out.
My solution would involve ajax upload(s) to S3 as a first step. Once you're done with the files, you can submit all the other fields (not ajax) to your webserver, eventually adding the generated S3 links.