I'm uploading an image(s) for a certain item. I see the files are being stored and saved in the server just fine but yet it gives me a 404 error when the UI's supposed to show it, if I refresh in 2 seconds, it appears correctly.
I know this is weird and that I didn't give much information or code, it would be a mess if I paste all the functions and backend calls I'm doing, I just want to know if someone's has dealed with this kind of things or knows what it can be.
I
Ok, so the problem was that I was uploading the file(s) to the assets folder, and the view can't access to the files there, it searches for the ones in .tmp, so I uploaded them to .tmp and then copied them to assets, so in the next app lift, these files are copied to .tmp again, cause tmp is destroyed as soon as the server is stopped.
Related
A PHP web application hosted locally on XAMPP does not accept changes or deletion of its files.
Whenever I make changes to a code in the file and run it , the browser displays the changes, but after a refresh, the changes are reversed.
i tried to delete the file or other files, but they come back when i refresh the pages.
I made changes to some codes in the files, and after saving them, the changes appeared just once in the browser. After refreshing the page again, all changes are reversed back to the old state. i tried deleting those particular files but it returns like it never happened.
Can someone help with a solution please? Thank you.
Maybe it is a permissions problem in your local XAMPP.
Did you try these actions on a server? I remember that sometimes the act of deleting doesn't work in my local project but when I test it on the online server works correctly.
I hope that this info helps you.
Kind regards
I am encountering a problem on my internal website. Everything was working fine until someone turned the server off, so I had to turn on the server via Docker. The site was up and running fine after that.
However, my colleagues quickly realized that they could not add files to the website, i.e. you first upload files to the site, select save and then it will save the uploaded file. Upon further inspection, I found out that you could upload files from some pages only, i.e. both pages 1 and 2 allow you to upload documents, but only page 2 accepts the upload request and successfully uploads it to the site; page 1 will attempt to upload and return saved successfully, but the files will not have been uploaded.
To provide some context to the situation, I inputted "sudo pkill -f uwsgi -9" before running the server again using Docker. More importantly, the internal website is vital for everyday operations and cannot be down under any circumstances, so I am a bit reluctant to mess with the server in fear of destroying whatever that can still be used. My colleagues are still getting by because they can upload from another page and still have access to the information on the website.
Besides that, the biggest problem is that I have only been in this job for 2 weeks and do not know the code base through and through. The handover process was also bad because the previous guy left 2 weeks prior to me starting this job. I have contacted him and shown him the problem. He told me that he was also unfamiliar with this problem and that the system was running fine the whole time.
The error is as follows:
[error when I try to upload from this page]
[1]: https://i.stack.imgur.com/LnGWs.png [1]
Works fine here:
[works from this page]
[2]: https://i.stack.imgur.com/5QhdT.png [2]
The problem is that I am on a wild goose chase and cannot identify the problem. Moreover, the error suggests that the code base has some error, which conflicts with what the previous guy told me, as I have also seen the system up and running for the past 2 weeks.
Would be very grateful for any ideas!
I have a web application that triggers actions at the server side which result in the generation of data files.
The so generated data files are stored within a folder at drive different from the one where the Web application is.
What I tried so far is to create a shortcut (Windows Server) next to the Index.html, where the shortcut points to the folder at the second drive.
This solution does not appear to work:
If I copy the data file to the same folder where the Index.html file is and enter navigate to the URL httm://127.0.0.1:324324/Data_File.xlsx I get the file downloaded.
If I enter httm://127.0.0.1:324324/MyShortcut/Data_File.xlsx (where MyShortcut points to a folder in drive D) the attempt fails.
How can I achieve this?
The need to access files in the different drive is essential.
You need to configure your server to serve that folder under different location. The only reason you are able to see your app and access that folder is cause server is set up to serve it ATM, not because you are making the right calls from the front or cause the front is asking nicely.
Don't know what Windows server version you are using and IIS version that goes on it, or are you even using IIS (you most probably do) but depending on what you use you need to do something in a lines of this:
IIS7 config
What you probably wanna do is create virtual folder in IIS. Try looking into it, then if you fail ask a question with proper tags according where are you stuck.
I don't see how this is connected to front-end at all so front end tags wont get you far.
EDIT:
Oh, in that case get a second file server running for that folder? This should be the fastest way, use what you can from this list: list
On cloudflare I want to disable caching and see my website changes immediately that I've pushed live.
Things I've tried:
I've put development mode on.
Create a bypass on caching in page rules.
Purged an individual webpage.
Purged the website.
Set cache to clear every 2 hours.
None of the above worked.
Tech I'm using:
Angular2
SystemJS
Typescript which becomes javascript on build.
Firebase for hosting and database.
Cloudflare for SSL etc.
The only way people see my website changes, it if they hard refresh.
The main problem is I've got a javascript file called app.js and its has all my javascript in for my Angular app. And it doesnt seem like its trying to get the resource in the browser.
I've changed the app.js to app.js?1490959855777
And still doesnt fetch the file again.
I basically want to see my JS file without a user having to hard refresh.
Based on the discussion above, it looks like the caching is happening on the browser - since a hard refresh will get the new file contents.
I think what happened is CF told the browser to hold onto that file for a very log time. And the browser is listening to that request.
Because you can't ask your users to do a hard refresh, you'll need to rename the static files that are being cached so aggressively.
I'm uploading a JavaScript file that a freelancer that I hired sends me and when I access this file directly over the url, everything seems fine.
But now when I add one line of code to this file and upload it again, sometimes the changes are not displayed even when I access it again over the url or the line of code that I added is displayed but some lines of code are missing at the end.
I checked the file that I uploaded several times over different ftp clients and the file is exactly the file that I upload ofc.
The file is part of a Wordpress plugin, I'm running on a Nginx Server, I don't have any kind of caching plugin.
What is going on ?