Im currently working on a cms, and building an ajax / php remote updater script. The cms files are located on Github, and im using the API to get the file changes and source of those changes. As you can see here: https://api.github.com/repos/Plexis/Plexis/commits/116743cefde6765a4d4a8d0558bd17c4908dd586
Under "files" it lists all the changed files. The problem is, renamed / moved files. I cant seem to get a solid idea of how to get the original file so i can unlink it with php. If i try to get all the trees, that can take a ajax request per directoy... That's just too much. Anyone have an idea where i can get the source file's name and location before it was renamed / moved?
Might ask your changes as you're doing now, then for new files do not exist or could you try
https://api.github.com/repos/{user}/{repo}/commits?path={file.path}
for get her history. You can try with the hast too, the hash is the same event if the file has a diferent name
Related
I cannot believe this hasn't been asked before, but I cannot find the answer on stackoverflow, please redirect me if this is a duplicate and I'm too retarded to find it.
I am creating a script that will download a kmz file from my custom google map, then will unzip it, read the xml and create a web page that lists all my markers. But I don't have access to the servers to create a writable folder so where can I download the kmz file to then unzip it?
Tried the temp folder (/var/tmp) and it seems to download the file, but I cannot work on the file afterwards or extract it, probably because the file gets deleted right after I call fclose, after downloading, as it doesn't exist anymore if I scan the directory.
UPDATE:
To answer question, the file is immediately deleted because it is a shared server and there are tons of session files in that folder that are created by all the visitors of each websites
I'm needing help on a starting point of a project (if possible).
What I'm looking to do: Have a part of a website that contains files (done). They will all be Excel files. A user can open the file (double-click or right-click -> open), make some edits, save the file and this will be updated on the server. Looking for something very similar to how you edit files through FileZilla FTP.
Where I am confused: What is the terminology I would use to search for assistance on how to operate this? I have searched SO for 'custom FTP' and the like, however I think this is incorrect. I'm missing/confused on what is needed for communicating with the server.
What I have tried: I built the page containing the files. The page holds a bunch of file names and has links to download/open. The HREF is the location of the file on the server. It downloads fine but when saving the opened file, it only saves locally and not on the server. What else should I include so the edits are saved on the server?
Example of a file on the site:
File name
Any links or verbiage to point me in the right direction would be greatly appreciated. Let me know if further information is needed. Thank you!
I am investigating dropbox possibilities for integration with another api.
Can you get a hook to a file in dropbox.. for example - a url to open up and resave the file with new content.
Can you also create files using the dropbox api if permission has previously been granted? Maybe .txt or .xls files etc.
I believe that dropbox uses a local folder to store files, then some sort of background daemon to monitor said folder for changes. If this is the case, you can simply make changes to files in that folder and the rest should be automatic.
Please correct me if I'm wrong.
So I am running xampp and wordpress. I have an image uploaded to the uploads directory named "avatar.jpeg". It displays just fine. But when I delete it and upload a new image file named "avatar.jpeg", the server doesn't reflect the change and just shows the old file. But when I open the file in Eclipse or my explorer, then the server starts showing the change and displays the new image.
This is probably something basic which I never learned about. I tried chmod to set the file permissions on the new file but that didn't help.
The file will be cached in your browser. To force a reload, append an arbitrary variable to your file, e.g. <img src="yourfile.jpg?1234567" />
I also guess it's a caching issue like freddy K. does.
I would suggest to configure ETags on your Server.
Simply appending something to the URL may only help you when the appended string is changing on every update of the requested file(using the current timestamp or similar all the time will force the client to download the file on every request and slow down the page).
http://httpd.apache.org/docs/2.0/mod/core.html#fileetag
I'm not sure if this is the best place to ask this question. However, I accept the possiblity of the question being moved/deleted.
I current have a website that does some file processing if a directory name is provided (local file system). I take the input in an HTML form. I'm looking to incorporate a script that allows the user to upload files / see the directory structure within the website directory. (Instead of them having to remember the name of the folder). However, most importantly, I'm looking for the two following features:
-Ability to be able to click and unzip a .zip or .rar file that they upload (Very important).
-Ability to perhaps incorporate the project as a sidebar using frames (Not that important, I could modify the scripts index page, if I have to).
A really good script, I found online was http://www.filelistpro.com/features.html, however, the problem is that it doesn't handle the option for unzipping a file.
Ajaxplorer - Demo - login using demo/demo
More information - http://www.ajaxplorer.info